$result->identity = $reply_msg['identity'];
break;
+case 'CancelCompose':
case 'DeleteDraft':
- $index = Horde_Util::getPost('index');
- if (empty($indices)) {
- break;
+ $imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
+ $imp_compose->destroy();
+ if ($action == 'DeleteDraft') {
+ $imp_message = &IMP_Message::singleton();
+ $idx_array = array($imp_compose->getMetadata('draft_index') . IMP::IDX_SEP . IMP::folderPref($prefs->getValue('drafts_folder'), true));
+ $imp_message->delete($idx_array, array('nuke' => true));
}
- $imp_message = &IMP_Message::singleton();
- $idx_array = array($index . IMP::IDX_SEP . IMP::folderPref($prefs->getValue('drafts_folder'), true));
- $imp_message->delete($idx_array, array('nuke' => true));
break;
case 'DeleteAttach':
/* The headers of the message. */
$header = array();
-foreach (array('to', 'cc', 'bcc', 'subject', 'in_reply_to', 'references') as $v) {
+foreach (array('to', 'cc', 'bcc', 'subject') as $v) {
$header[$v] = rawurldecode(Horde_Util::getFormData($v, ''));
}
$result->success = 1;
/* Delete existing draft. */
- _removeAutoSaveDraft(Horde_Util::getFormData('draft_index'));
+ _removeAutoSaveDraft($imp_compose->getMetadata('draft_index'));
- if ($action == 'auto_save_draft') {
- /* Just update the last draft index so subsequent
- * drafts are properly replaced. */
- $result->draft_index = (int)$imp_compose->saveDraftIndex();
- } else {
+ if ($action != 'auto_save_draft') {
$notification->push($res);
}
} catch (IMP_Compose_Exception $e) {
$message = Horde_Util::getFormData('message');
$html = Horde_Util::getFormData('html');
- $result->index = intval(Horde_Util::getFormData('index'));
+ $result->index = $imp_compose->getMetadata('index');
- $reply_folder = Horde_Util::getFormData('folder');
- if ($reply_type = Horde_Util::getFormData('reply_type')) {
- $result->reply_folder = Horde_Util::getFormData('folder');
+ if ($reply_type = $imp_compose->getMetadata('reply_type')) {
+ $result->reply_folder = $imp_compose->getMetadata('mailbox');
$result->reply_type = $reply_type;
}
$options = array(
'readreceipt' => Horde_Util::getFormData('request_read_receipt'),
- 'reply_index' => $result->index . IMP::IDX_SEP . $reply_folder,
- 'reply_type' => $reply_type,
'save_attachments' => Horde_Util::getFormData('save_attachments_select'),
'save_sent' => (($prefs->isLocked('save_sent_mail'))
? $identity->getValue('save_sent_mail')
/* Remove any auto-saved drafts. */
if ($prefs->getValue('auto_save_drafts') ||
$prefs->getValue('auto_delete_drafts')) {
- _removeAutoSaveDraft(Horde_Util::getFormData('draft_index'));
+ _removeAutoSaveDraft($imp_compose->getMetadata('draft_index'));
$result->draft_delete = 1;
}
}
/* Update maillog information. */
- if (!empty($header['in_reply_to']) &&
- !empty($GLOBALS['conf']['maillog']['use_maillog']) &&
- ($tmp = DIMP::getMsgLogInfo($header['in_reply_to']))) {
- $result->log = $tmp;
+ if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
+ $in_reply_to = $imp_compose->getMetadata('in_reply_to');
+ if (!empty($in_reply_to) &&
+ ($tmp = DIMP::getMsgLogInfo($in_reply_to))) {
+ $result->log = $tmp;
+ }
}
$res = DIMP::getFolderResponse($imptree);
: $msg . "\n" . $sig;
}
-$args = array(
- 'folder' => $folder,
- 'index' => $index,
- 'composeCache' => $imp_compose->getCacheId(),
- 'qreply' => false,
-);
-
$t = new IMP_Template(IMP_TEMPLATES . '/imp/');
$t->setOption('gettext', true);
$t->set('title', $title);
$t->set('closelink', IMP::img('close.png', 'X', array('id' => 'compose_close'), $registry->getImageDir('horde')));
-$compose_result = IMP_Views_Compose::showCompose($args);
+$compose_result = IMP_Views_Compose::showCompose(array(
+ 'folder' => $folder,
+ 'index' => $index,
+ 'composeCache' => $imp_compose->getCacheId(),
+ 'qreply' => false,
+));
+
$t->set('compose_html', $compose_result['html']);
/* Javscript variables to be set immediately. */
/* The message text and headers. */
$msg = '';
-$header = array(
- 'in_reply_to' => Horde_Util::getFormData('in_reply_to'),
- 'references' => Horde_Util::getFormData('references')
-);
+$header = array();
/* Set the current identity. */
$identity = &Identity::singleton(array('imp', 'imp'));
$f_cc = $f_bcc = null;
$header = array();
- if ($ctype = Horde_Util::getFormData('ctype')) {
+ $index = $imp_compose->getMetadata('index');
+ $thismailbox = $imp_compose->getMetadata('mailbox');
+
+ if ($ctype = $imp_compose->getMetadata('reply_type')) {
if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
break;
}
$options = array(
'save_sent' => $save_sent_mail,
'sent_folder' => $sent_mail_folder,
- 'reply_type' => $ctype,
- 'reply_index' => empty($index) ? null : $index . IMP::IDX_SEP . $thismailbox,
'readreceipt' => Horde_Util::getFormData('request_read_receipt')
);
try {
if ($imp_compose->buildAndSendMessage($message, $header, NLS::getEmailCharset(), false, $options)) {
+ $imp_compose->destroy();
+
if (Horde_Util::getFormData('resume_draft') &&
$prefs->getValue('auto_delete_drafts')) {
$imp_message = &IMP_Message::singleton();
require_once dirname(__FILE__) . '/lib/base.php';
require_once 'Horde/Identity.php';
-/* The message text. */
+/* The message headers and text. */
+$header = array();
$msg = '';
-/* The headers of the message. */
-$header = array(
- 'in_reply_to' => Horde_Util::getFormData('in_reply_to'),
- 'references' => Horde_Util::getFormData('references')
-);
-
$get_sig = true;
$pgp_passphrase_dialog = $pgp_symmetric_passphrase_dialog = $showmenu = $smime_passphrase_dialog = false;
$cursor_pos = $oldrtemode = $rtemode = $siglocation = null;
$save_sent_mail = Horde_Util::getFormData('save_sent_mail');
$sent_mail_folder = $identity->getValue('sent_mail_folder');
$index = Horde_Util::getFormData('index');
-$reply_index = Horde_Util::getFormData('reply_index');
$thismailbox = Horde_Util::getFormData('thismailbox');
/* Check for duplicate submits. */
$title .= ' ' . $header['subject'];
$encoding = empty($charset) ? $reply_msg['encoding'] : $charset;
- $reply_index = $index;
break;
case 'forward':
try {
$imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, $encoding);
+ $imp_compose->destroy();
if ($isPopup) {
if ($prefs->getValue('compose_confirm')) {
$notification->push(_("Message redirected successfully."), 'horde.success');
'save_sent' => $save_sent_mail,
'sent_folder' => $sent_mail_folder,
'save_attachments' => Horde_Util::getFormData('save_attachments_select'),
- 'reply_type' => Horde_Util::getFormData('reply_type'),
- 'reply_index' => (empty($reply_index) ? null : $reply_index . IMP::IDX_SEP . $thismailbox),
'encrypt' => $prefs->isLocked('default_encrypt') ? $prefs->getValue('default_encrypt') : Horde_Util::getFormData('encrypt_options'),
'priority' => Horde_Util::getFormData('x_priority'),
'readreceipt' => Horde_Util::getFormData('request_read_receipt')
try {
$sent = $imp_compose->buildAndSendMessage($message, $header, $charset, $rtemode, $options);
+ $imp_compose->destroy();
} catch (IMP_Compose_Exception $e) {
$get_sig = false;
$code = $e->getCode();
/* Save the draft. */
try {
$result = $imp_compose->saveDraft($header, $message, NLS::getCharset(), $rtemode);
+ $imp_compose->destroy();
/* Closing draft if requested by preferences. */
if ($isPopup) {
case 'cancel_compose':
$imp_compose->deleteAllAttachments();
+ $imp_compose->destroy();
if ($isPopup) {
Horde_Util::closeWindowJS();
} else {
$template_output = $t->fetch(IMP_TEMPLATES . '/compose/redirect.html');
} else {
- if (!($reply_type = Horde_Util::getFormData('reply_type'))) {
- switch ($actionID) {
- case 'reply':
- case 'reply_all':
- case 'reply_list':
- $reply_type = 'reply';
- break;
-
- case 'forward':
- $reply_type = 'forward';
- break;
- }
- }
-
/* Prepare the compose template. */
$tabindex = 0;
'compose_formToken' => Horde_Token::generateId('compose'),
'composeCache' => $composeCacheID,
'mailbox' => htmlspecialchars($imp_mbox['mailbox']),
- 'thismailbox' => $thismailbox,
'attachmentAction' => '',
'oldrtemode' => $rtemode,
- 'rtemode' => $rtemode,
- 'index' => $index
+ 'rtemode' => $rtemode
);
if ($_SESSION['imp']['file_upload']) {
foreach (array('page', 'start', 'popup') as $val) {
$hidden[$val] = htmlspecialchars(Horde_Util::getFormData($val));
}
- if ($reply_type) {
- $hidden['reply_type'] = $reply_type;
- $hidden['reply_index'] = $reply_index;
- $hidden['in_reply_to'] = htmlspecialchars($header['in_reply_to']);
- if ($reply_type == 'reply') {
- $hidden['references'] = htmlspecialchars($header['references']);
- }
- }
if (!empty($resume_draft)) {
$hidden['resume_draft'] = 1;
}
confirmCancel: function()
{
if (window.confirm(DIMP.text_compose.cancel)) {
- if (DIMP.conf_compose.auto_save_interval_val) {
- DimpCore.doAction('DeleteDraft', { index: $F('index') });
- }
+ DimpCore.doAction(DIMP.conf_compose.auto_save_interval_val ? 'DeleteDraft' : 'CancelCompose', { imp_compose: $F('composeCache') });
return this.closeCompose();
}
},
this.removeAttach(al);
}
- $('draft_index', 'composeCache').invoke('setValue', '');
+ $('composeCache').setValue('');
$('qreply', 'sendcc', 'sendbcc').invoke('hide');
[ $('msgData'), $('togglecc').up(), $('togglebcc').up() ].invoke('show');
if (this.editor_on) {
switch (d.action) {
case 'auto_save_draft':
this.button_pressed = false;
- $('draft_index').setValue(d.draft_index);
break;
case 'save_draft':
DIMP.baseWindow.DimpBase.flag(d.reply_type == 'reply' ? '\\answered' : '$forwarded', true, { index: d.index, mailbox: d.reply_folder, noserver: true });
}
+ // @TODO: Needed?
if (d.folder) {
DIMP.baseWindow.DimpBase.createFolder(d.folder);
}
this.toggleCC('bcc');
}
$('subject').setValue(header.subject);
- $('in_reply_to').setValue(header.in_reply_to);
- $('references').setValue(header.references);
- $('reply_type').setValue(header.replytype);
Field.focus(focus || 'to');
this.resizeMsgArea();
const VFS_DRAFTS_PATH = '.horde/imp/drafts';
/**
+ * Singleton instances.
+ *
+ * @var array
+ */
+ static protected $_instances = array();
+
+ /**
* The cached attachment data.
*
* @var array
protected $_cache = array();
/**
+ * Various metadata for this message.
+ *
+ * @var array
+ */
+ protected $_metadata = array();
+
+ /**
* The aggregate size of all attachments (in bytes).
*
* @var integer
protected $_linkAttach = false;
/**
- * The UID of the last draft saved via saveDraft().
- *
- * @var integer
- */
- protected $_draftIdx;
-
- /**
* The cache ID used to store object in session.
*
* @var string
protected $_cacheid;
/**
- * Has the attachment list been modified.
+ * Mark as modified for purposes of storing in the session.
*
* @var boolean
*/
*/
static public function singleton($cacheid = null)
{
- static $instance = array();
-
- if (!is_null($cacheid) && !isset($instance[$cacheid])) {
- $cacheSess = Horde_SessionObjects::singleton();
- $instance[$cacheid] = $cacheSess->query($cacheid);
- if (!empty($instance[$cacheid])) {
- $cacheSess->setPruneFlag($cacheid, true);
- }
+ if (!is_null($cacheid) && !isset(self::$_instances[$cacheid])) {
+ $obs = Horde_SessionObjects::singleton();
+ self::$_instances[$cacheid] = $obs->query($cacheid);
}
- if (is_null($cacheid) || empty($instance[$cacheid])) {
+ if (is_null($cacheid) || empty(self::$_instances[$cacheid])) {
$cacheid = is_null($cacheid) ? uniqid(mt_rand()) : $cacheid;
- $instance[$cacheid] = new IMP_Compose($cacheid);
+ self::$_instances[$cacheid] = new IMP_Compose($cacheid);
}
- return $instance[$cacheid];
+ return self::$_instances[$cacheid];
}
/**
{
if ($this->_modified) {
$this->_modified = false;
- $cacheSess = Horde_SessionObjects::singleton();
- $cacheSess->overwrite($this->_cacheid, $this, false);
+ $obs = Horde_SessionObjects::singleton();
+ $obs->overwrite($this->_cacheid, $this, false);
}
}
/**
+ * Destroys an IMP_Compose instance.
+ */
+ public function destroy()
+ {
+ $obs = Horde_SessionObjects::singleton();
+ $obs->prune($this->_cacheid);
+ }
+
+ /**
+ * Gets metadata about the current object.
+ *
+ * @param string $name The metadata name.
+ *
+ * @return mixed The metadata value or null if it doesn't exist.
+ */
+ public function getMetadata($name)
+ {
+ return isset($this->_metadata[$name])
+ ? $this->_metadata[$name]
+ : null;
+ }
+
+ /**
* Saves a message to the draft folder.
*
* @param array $header List of message headers.
protected function _saveDraftServer($data, $drafts_mbox)
{
$imp_folder = IMP_Folder::singleton();
- $this->_draftIdx = null;
/* Check for access to drafts folder. */
if (!$imp_folder->exists($drafts_mbox) &&
/* Add the message to the mailbox. */
try {
$ids = $GLOBALS['imp_imap']->ob->append($drafts_mbox, array(array('data' => $data, 'flags' => $append_flags, 'messageid' => $headers->getValue('message-id'))));
- $this->_draftIdx = reset($ids);
+ $this->_metadata['draft_index'] = reset($ids);
return sprintf(_("The draft has been saved to the \"%s\" folder."), IMP::displayFolder($drafts_mbox));
} catch (Horde_Imap_Client_Exception $e) {
+ unset($this->_metadata['draft_index']);
return _("The draft was not successfully saved.");
}
}
/**
- * Returns the UID of the last message saved via saveDraft().
- *
- * @return integer An IMAP UID.
- */
- public function saveDraftIndex()
- {
- return $this->_draftIdx;
- }
-
- /**
* Resumes a previously saved draft message.
*
* @param string $index The IMAP message mailbox/index. The index should
'subject' => $headers->getValue('subject')
);
- list($this->_draftIdx,) = explode(IMP::IDX_SEP, $index);
+ list($this->_metadata['draft_index'],) = explode(IMP::IDX_SEP, $index);
return array(
'header' => $header,
);
}
-
/**
* Builds and sends a MIME message.
*
* 'save_sent' = (bool) Save sent mail?
* 'sent_folder' = (string) The sent-mail folder (UTF7-IMAP).
* 'save_attachments' = (bool) Save attachments with the message?
- * 'reply_type' = (string) What kind of reply this is (reply or forward).
- * 'reply_index' = (string) The IMAP message mailbox/index of the message
- * we are replying to. The index should be in
- * IMP::parseIndicesList() format #1.
* 'encrypt' => (integer) A flag whether to encrypt or sign the message.
* One of IMP::PGP_ENCRYPT, IMP::PGP_SIGNENC,
* IMP::SMIME_ENCRYPT, or IMP::SMIME_SIGNENC.
$headers->addHeader('Subject', Horde_String::convertCharset($header['subject'], $browser_charset, $charset));
/* Add necessary headers for replies. */
- if (!empty($opts['reply_type']) && ($opts['reply_type'] == 'reply')) {
- if (!empty($header['references'])) {
- $headers->addHeader('References', implode(' ', preg_split('|\s+|', trim($header['references']))));
+ if (!empty($this->_metadata['reply_type']) &&
+ ($this->_metadata['reply_type'] == 'reply')) {
+ if (!empty($this->_metadata['references'])) {
+ $headers->addHeader('References', implode(' ', preg_split('|\s+|', trim($this->_metadata['references']))));
}
- if (!empty($header['in_reply_to'])) {
- $headers->addHeader('In-Reply-To', $header['in_reply_to']);
+ if (!empty($this->_metadata['in_reply_to'])) {
+ $headers->addHeader('In-Reply-To', $this->_metadata['in_reply_to']);
}
}
/* Unsuccessful send. */
Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
if (isset($sentmail)) {
- $sentmail->log(empty($opts['reply_type']) ? 'new' : $opts['reply_type'], $headers->getValue('message-id'), $val['recipients'], false);
+ $sentmail->log(empty($this->_metadata['reply_type']) ? 'new' : $this->_metadata['reply_type'], $headers->getValue('message-id'), $val['recipients'], false);
}
throw new IMP_Compose_Exception(sprintf(_("There was an error sending your message: %s"), $e->getMessage()));
/* Store history information. */
if (isset($sentmail)) {
- $sentmail->log(empty($opts['reply_type']) ? 'new' : $opts['reply_type'], $headers->getValue('message-id'), $val['recipients'], true);
+ $sentmail->log(empty($this->_metadata['reply_type']) ? 'new' : $this->_metadata['reply_type'], $headers->getValue('message-id'), $val['recipients'], true);
}
}
$sent_saved = true;
- if (!empty($opts['reply_type'])) {
+ if (!empty($this->_metadata['reply_type'])) {
/* Log the reply. */
- if (!empty($header['in_reply_to']) &&
+ if (!empty($this->_metadata['in_reply_to']) &&
!empty($conf['maillog']['use_maillog'])) {
- IMP_Maillog::log($opts['reply_type'], $header['in_reply_to'], $recipients);
+ IMP_Maillog::log($this->_metadata['reply_type'], $this->_metadata['in_reply_to'], $recipients);
}
- if (!empty($opts['reply_index'])) {
- $imp_message = IMP_Message::singleton();
+ $imp_message = IMP_Message::singleton();
+ $reply_index = array($this->_metadata['index'] . IMP::IDX_SEP . $this->_metadata['mailbox']);
- switch ($opts['reply_type']) {
- case 'reply':
- /* Make sure to set the IMAP reply flag and unset any
- * 'flagged' flag. */
- $imp_message->flag(array('\\answered'), array($opts['reply_index']));
- $imp_message->flag(array('\\flagged'), array($opts['reply_index']), false);
- break;
+ switch ($this->_metadata['reply_type']) {
+ case 'reply':
+ /* Make sure to set the IMAP reply flag and unset any
+ * 'flagged' flag. */
+ $imp_message->flag(array('\\answered'), $reply_index);
+ $imp_message->flag(array('\\flagged'), $reply_index, false);
+ break;
- case 'forward':
- /* Set the '$Forwarded' flag, if possible, in the mailbox.
- * This flag is a pseudo-standard flag. See, e.g.:
- * http://tools.ietf.org/html/draft-melnikov-imap-keywords-03 */
- $imp_message->flag(array('$Forwarded'), array($opts['reply_index']));
- break;
- }
+ case 'forward':
+ /* Set the '$Forwarded' flag, if possible, in the mailbox.
+ * See RFC 4550 [2.8] */
+ $imp_message->flag(array('$Forwarded'), $reply_index);
+ break;
}
}
'to' => '',
'cc' => '',
'bcc' => '',
- 'subject' => '',
- 'in_reply_to' => '',
- 'references' => ''
+ 'subject' => ''
);
$h = $contents->getHeaderOb();
$match_identity = $this->_getMatchingIdentity($h);
- /* Set the message_id and references headers. */
+ $this->_metadata['index'] = $contents->getIndex();
+ $this->_metadata['mailbox'] = $contents->getMailbox();
+ $this->_metadata['reply_type'] = 'reply';
+ $this->_modified = true;
+
+ /* Set the message-id related headers. */
if (($msg_id = $h->getValue('message-id'))) {
- $header['in_reply_to'] = chop($msg_id);
- if (($header['references'] = $h->getValue('references'))) {
- $header['references'] .= ' ' . $header['in_reply_to'];
+ $this->_metadata['in_reply_to'] = chop($msg_id);
+
+ if (($refs = $h->getValue('references'))) {
+ $refs .= ' ' . $this->_metadata['in_reply_to'];
} else {
- $header['references'] = $header['in_reply_to'];
+ $refs = $this->_metadata['in_reply_to'];
}
+ $this->_metadata['references'] = $refs;
}
$subject = $h->getValue('subject');
'to' => '',
'cc' => '',
'bcc' => '',
- 'subject' => '',
- 'in_reply_to' => '',
- 'references' => ''
+ 'subject' => ''
);
$h = $contents->getHeaderOb();
$format = 'text';
$msg = '';
- /* We need the Message-Id so we can log this event. */
- $message_id = $h->getValue('message-id');
- $header['in_reply_to'] = chop($message_id);
+ $this->_metadata['index'] = $contents->getIndex();
+ $this->_metadata['mailbox'] = $contents->getMailbox();
+
+ /* We need the Message-Id so we can log this event. This header is not
+ * added to the outgoing messages. */
+ $this->_metadata['in_reply_to'] = trim($h->getValue('message-id'));
+ $this->_metadata['reply_type'] = 'forward';
+ $this->_modified = true;
$header['subject'] = $h->getValue('subject');
if (!empty($header['subject'])) {
);
}
- $draft_index = $composeCache = null;
+ $composeCache = null;
if (!empty($args['composeCache'])) {
$imp_compose = &IMP_Compose::singleton($args['composeCache']);
- $draft_index = intval($imp_compose->saveDraftIndex());
$composeCache = $args['composeCache'];
if ($imp_compose->numberOfAttachments()) {
<?php
/**
- * compose.php - Used by DIMP_Views_Compose:: to render the compose screen.
+ * compose.php - Used by IMP_Views_Compose:: to render the compose screen.
*
* Variables passed in from calling code:
- * $args('folder', 'index'), $compose_html, $draft_index, $from, $id,
- * $identity, $composeCache, $rte, $selected_identity, $sent_mail_folder
+ * $compose_html, $from, $id, $identity, $composeCache, $rte,
+ * $selected_identity, $sent_mail_folder
*
* Copyright 2005-2009 The Horde Project (http://www.horde.org/)
*
<input type="hidden" id="action" name="action" />
<input type="hidden" id="last_identity" name="last_identity" value="<?php echo (int)$selected_identity ?>" />
<input type="hidden" id="html" name="html" value="<?php echo intval($rte && $compose_html) ?>" />
-<input type="hidden" id="in_reply_to" name="in_reply_to" />
-<input type="hidden" id="references" name="references" />
-<input type="hidden" id="folder" name="folder" value="<?php echo $args['folder'] ?>" />
-<input type="hidden" id="index" name="index" value="<?php echo $args['index'] ?>" />
-<input type="hidden" id="draft_index" name="draft_index" value="<?php echo $draft_index ?>" />
-<input type="hidden" id="reply_type" name="reply_type" />
<input type="hidden" id="composeCache" name="composeCache" value="<?php echo $composeCache ?>" />
<div class="dimpActions dimpActionsCompose">
// Hidden Variables.
$f->add(new Horde_Mobile_hidden('composeCache', $cacheID));
-$f->add(new Horde_Mobile_hidden('thismailbox', Horde_Util::getFormData('thismailbox')));
-$f->add(new Horde_Mobile_hidden('index', Horde_Util::getFormData('index')));
$f->add(new Horde_Mobile_hidden('resume_draft', Horde_Util::getFormData('resume_draft', $resume_draft)));
-if (Horde_Util::getFormData('ctype')) {
- $f->add(new Horde_Mobile_hidden('ctype', Horde_Util::getFormData('ctype')));
-} else {
- switch ($actionID) {
- case 'r':
- case 'ra':
- case 'rl':
- $f->add(new Horde_Mobile_hidden('ctype', 'reply'));
- break;
-
- case 'f':
- $f->add(new Horde_Mobile_hidden('ctype', 'forward'));
- break;
- }
-}
-
-if ((Horde_Util::getFormData('is_reply') == 1) ||
- (strpos($actionID, 'reply') === 0)) {
- $f->add(new Horde_Mobile_hidden('is_reply', 1));
- $f->add(new Horde_Mobile_hidden('in_reply_to', $header['in_reply_to']));
- $f->add(new Horde_Mobile_hidden('references', $header['references']));
-}
-
if (!$prefs->isLocked('default_identity')) {
$ib = &$f->add(new Horde_Mobile_block(new Horde_Mobile_text(_("Identity"))));
$ident_sel = &$ib->add(new Horde_Mobile_select('identity'));