$imp_compose = IMP_Compose::singleton(Util::getPost('imp_compose'));
$imp_contents = IMP_Contents::singleton($idx_string);
$imp_ui = new IMP_UI_Compose();
- $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, Util::getPost('type'), $idx_string);
+ $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $idx_string);
$header = $fwd_msg['headers'];
$header['replytype'] = 'forward';
$show_editor = false;
$title = _("New Message");
-if (in_array($type, array('reply', 'reply_all', 'reply_list', 'forward_all', 'forward_body', 'forward_attachments', 'resume'))) {
+if (in_array($type, array('reply', 'reply_all', 'reply_list', 'forward', 'resume'))) {
if (!$index || !$folder) {
$type = 'new';
}
}
break;
-case 'forward_all':
-case 'forward_body':
-case 'forward_attachments':
- $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $type, $index . IMP::IDX_SEP . $folder);
- if ($type == 'forward_all') {
- $msg = '';
- } else {
- $msg = $fwd_msg['body'];
- }
+case 'forward':
+ $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $index . IMP::IDX_SEP . $folder);
+ $msg = $fwd_msg['body'];
$header = $fwd_msg['headers'];
$header['replytype'] = 'forward';
$title = $header['title'];
}
$type = 'forward';
- if (!$prefs->isLocked('default_identity') && !is_null($fwd_msg['identity'])) {
+ if (!$prefs->isLocked('default_identity') &&
+ !is_null($fwd_msg['identity'])) {
$identity->setDefault($fwd_msg['identity']);
}
break;
case 'reply':
case 'reply_all':
case 'reply_list':
- case 'forward_all':
- case 'forward_body':
- case 'forward_attachments':
+ case 'forward':
case 'redirect_compose':
case 'fwd_digest':
// These are all safe actions that might be invoked without a token.
$reply_index = $index;
break;
-case 'forward_all':
-case 'forward_body':
-case 'forward_attachments':
+case 'forward':
if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
break;
}
- $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $actionID, $index . IMP::IDX_SEP . $thismailbox);
- if ($actionID == 'forward_all') {
- $msg = '';
- } else {
- $msg = $fwd_msg['body'];
- }
+ $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $index . IMP::IDX_SEP . $thismailbox);
+ $msg = $fwd_msg['body'];
$header = $fwd_msg['headers'];
$format = $fwd_msg['format'];
$rtemode = ($rtemode || (!is_null($rtemode) && ($format == 'html')));
break;
case 'forward':
- case 'forward_all':
- case 'forward_body':
- case 'forward_attachments':
$reply_type = 'forward';
break;
}
'column' => _("Message Options"),
'label' => _("Message Replies/Forwards"),
'desc' => _("Customize how you reply to or forward mail."),
- 'members' => array('reply_quote', 'reply_format', 'forward_default',
- 'forward_bodytext', 'reply_headers', 'attrib_text')
+ 'members' => array('reply_quote', 'reply_format', 'forward_bodytext',
+ 'reply_headers', 'attrib_text')
);
$prefGroups['drafts'] = array(
'type' => 'checkbox',
'desc' => _("When replying/forwarding to a message, should we use the same format as the original message?"));
-// What should the default forward method be?
-$_prefs['forward_default'] = array(
- 'value' => 'forward_all',
- 'locked' => false,
- 'shared' => false,
- 'type' => 'enum',
- 'enum' => array('forward_all' => _("Entire Message"),
- 'forward_body' => _("Body Text Only"),
- 'forward_attachments' => _("Body Text with Attachments")),
- 'desc' => _("Default forwarding method:"),
- 'help' => 'message-forward');
-
// Should the original message be included?
$_prefs['forward_bodytext'] = array(
- 'value' => 1,
+ 'value' => 0,
'locked' => false,
'shared' => false,
'type' => 'checkbox',
v5.0-git
--------
+[mms] Simplify forwarding - always attach entire message.
[mms] Remember splitbar position on login/refresh (DIMP).
[mms] Disable some advanced functions if using POP3 driver (caching,
searching, sorting) because it is too resource intensive.
* servers.php has changed
* imp_hook_vinfo has changed
-* alternative_display, attachment_display pref is gone.
+* alternative_display, attachment_display, forward_default pref is gone.
* imp_hook_spam_bounce -> imp_hook_spam_email
* imp_hook_msglist_format input has changed.
this.flag(id.substring(12));
break;
+ case 'ctx_message_forward':
+ this.composeMailbox('forward');
+ break;
+
case 'ctx_draft_resume':
this.composeMailbox('resume');
break;
this.composeMailbox(id.substring(10));
break;
- case 'ctx_forward_forward_all':
- case 'ctx_forward_forward_body':
- case 'ctx_forward_forward_attachments':
- this.composeMailbox(id.substring(12));
- break;
-
case 'previewtoggle':
this.togglePreviewPane();
break;
case 'button_forward':
case 'button_reply':
- this.composeMailbox(id == 'button_reply' ? 'reply' : DIMP.conf.forward_default);
+ this.composeMailbox(id == 'button_reply' ? 'reply' : 'forward');
break;
case 'button_deleted':
/* Add popdown menus. */
this._addMouseEvents({ id: 'button_reply', type: 'reply' }, true);
DM.disable('button_reply_img', true, true);
- this._addMouseEvents({ id: 'button_forward', type: 'forward' }, true);
- DM.disable('button_forward_img', true, true);
this._addMouseEvents({ id: 'button_other', type: 'otheractions' }, true);
DM.addSubMenu('ctx_message_reply', 'ctx_reply');
- DM.addSubMenu('ctx_message_forward', 'ctx_forward');
DM.addSubMenu('ctx_message_setflag', 'ctx_flag');
DM.addSubMenu('oa_setflag', 'ctx_flag');
DM.addSubMenu('ctx_draft_setflag', 'ctx_flag');
func = 'GetReplyData';
break;
- case 'forward_all':
- case 'forward_body':
- case 'forward_attachments':
+ case 'forward':
func = 'GetForwardData';
break;
}
case 'forward_link':
case 'reply_link':
- this.quickreply(id == 'reply_link' ? 'reply' : DIMP.conf.forward_default);
+ this.quickreply(id == 'reply_link' ? 'reply' : 'forward');
e.stop();
return;
this.quickreply(id.substring(10));
break;
- case 'ctx_forward_forward_all':
- case 'ctx_forward_forward_body':
- case 'ctx_forward_forward_attachments':
- this.quickreply(id.substring(12));
- break;
-
default:
parentfunc(id, elt);
break;
DimpCore.init();
this.addPopdown('reply_link', 'replypopdown');
- this.addPopdown('forward_link', 'fwdpopdown');
/* Set up address linking. */
[ 'from', 'to', 'cc', 'bcc', 'replyTo' ].each(function(a) {
* Determine the text and headers for a forwarded message.
*
* @param IMP_Contents $contents An IMP_Contents object.
- * @param string $forcebodytxt Force addition of body text, even if
- * prefs would not allow it.
*
* @return array An array with the following keys:
* <pre>
* message's addresses.
* </pre>
*/
- public function forwardMessage($contents, $forcebodytxt = false)
+ public function forwardMessage($contents)
{
/* The headers of the message. */
$header = array(
$header['subject'] = 'Fwd:';
}
- if ($forcebodytxt || $GLOBALS['prefs']->getValue('forward_bodytext')) {
+ if ($GLOBALS['prefs']->getValue('forward_bodytext')) {
$from = Horde_Mime_Address::addrArray2String($h->getOb('from'));
$msg_pre = "\n----- " .
'popup_width' => 820,
'popup_height' => 610,
- 'forward_default' => $prefs->getValue('forward_default'),
'spam_folder' => IMP::folderPref($prefs->getValue('spam_folder'), true),
'spam_reporting' => (int) !empty($conf['spam']['reporting']),
'spam_spamfolder' => (int) !empty($conf['spam']['spamfolder']),
/**
*/
- function getForwardData(&$imp_compose, &$imp_contents, $type, $index)
+ function getForwardData(&$imp_compose, &$imp_contents, $index)
{
- $fwd_msg = $imp_compose->forwardMessage($imp_contents, ($type == 'forward_body'));
- if ($type == 'forward_all') {
- $subject_header = $imp_compose->attachIMAPMessage(array($index), $fwd_msg['headers']);
- if ($subject_header === false) {
- // TODO: notification
- } else {
- $fwd_msg['headers']['subject'] = $subject_header;
- }
- } elseif ($type == 'forward_attachments') {
- $imp_compose->attachFilesFromMessage($imp_contents, array('notify' => true));
+ $fwd_msg = $imp_compose->forwardMessage($imp_contents);
+ $subject_header = $imp_compose->attachIMAPMessage(array($index), $fwd_msg['headers']);
+ if ($subject_header === false) {
+ // TODO: notification
+ } else {
+ $fwd_msg['headers']['subject'] = $subject_header;
}
return $fwd_msg;
</entry>
-->
-<entry id="message-forward">
- <title>Forwarding Email</title>
- <para>When forwarding an email, you have several choices.</para>
-
- <heading>Forwarding from the Mailbox View</heading>
- <para>In the mailbox view, you can forward multiple messages at the same time. Each message that you select will be sent, in its entirety, to your recipients. You will see each message as an attachment in your compose window. On the receiving end, the recipient(s) will see each email as an embedded email.</para>
-
- <heading>Forwarding from the Message View</heading>
- <para>When forwarding individual messages in the message view, you can choose three different options:</para>
- <para><b>1. Entire Message</b>: This option will attach the entire message to your email. The compose area will not contain any text from the forwarded message. This is the same as forwading a single email from the mailbox view, except that the Subject: line will be set for you.</para>
- <para><b>2. Body Text Only</b>: If you only want to forward the body of the email, choose this option. Any attachments to the original email will not be included in your forward. The text will appear in the compose area, and you can edit it if you wish or add your own comments.</para>
- <para><b>3. Body Text with Attachments</b>: To forward the attachments of an email along, along with the body as described in #2 Body Text Only, use this option. The body text will be placed in the compose area for you to edit, and all attachments to the original message will be copied to your forward.</para>
-
-</entry>
-
<entry id="compose-buttons">
<title>Message Composition: Actions</title>
<heading>Actions</heading>
$a_template->set('show_reply_all', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply_all') + $compose_params), _("To All"), 'widget', '', '', _("To _All"), true));
}
- $a_template->set('forward', Horde::widget(IMP::composeLink(array(), array('actionID' => $prefs->getValue('forward_default')) + $compose_params), _("Forward"), 'widget hasmenu', '', '', _("Fo_rward"), true));
- $a_template->set('forwardall', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward_all') + $compose_params), _("Entire Message"), 'widget', '', '', _("Entire Message"), true));
- $a_template->set('forwardbody', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward_body') + $compose_params), _("Body Text Only"), 'widget', '', '', _("Body Text Only"), true));
- $a_template->set('forwardattachments', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward_attachments') + $compose_params), _("Body Text with Attachments"), 'widget', '', '', _("Body Text with Attachments"), true));
+ $a_template->set('forward', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward') + $compose_params), _("Forward"), 'widget', '', '', _("Fo_rward"), true));
$a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _("Redirect"), 'widget', '', '', _("Redirec_t"), true));
}
<?php _createDAfmsg(_("Reply"), 'Reply', 'reply_link', 'hasmenu', $show_text) ?>
</span>
<span>
- <?php _createDAfmsg(_("Forward"), 'Forward', 'forward_link', 'hasmenu', $show_text) ?>
+ <?php _createDAfmsg(_("Forward"), 'Forward', 'forward_link', '', $show_text) ?>
</span>
<?php if (!empty($conf['spam']['reporting']) && (!$conf['spam']['spamfolder'] || ($folder != IMP::folderPref($prefs->getValue('spam_folder'), true)))): ?>
<span>
<?php endif; ?>
</div>
-<div class="context" id="ctx_fwdpopdown" style="display:none">
- <a id="ctx_forward_forward_all"><span class="contextImg"></span><?php echo _("Entire Message") ?></a>
- <a id="ctx_forward_forward_body"><span class="contextImg"></span><?php echo _("Body Text Only") ?></a>
- <a id="ctx_forward_forward_attachments"><span class="contextImg"></span><?php echo _("Attachments Only") ?></a>
-</div>
-
<div class="context" id="ctx_contacts" style="display:none">
<a id="ctx_contacts_new"><span class="contextImg"></span><?php echo _("New Message") ?></a>
<a id="ctx_contacts_add"><span class="contextImg"></span><?php echo _("Add to Address Book") ?></a>
<a id="ctx_reply_reply_list"><span class="contextImg"></span><?php echo _("To List") ?></a>
</div>
-<div class="context" id="ctx_forward" style="display:none">
- <a id="ctx_forward_forward_all"><span class="contextImg"></span><?php echo _("Entire Message") ?></a>
- <a id="ctx_forward_forward_body"><span class="contextImg"></span><?php echo _("Body Text Only") ?></a>
- <a id="ctx_forward_forward_attachments"><span class="contextImg"></span><?php echo _("Attachments Only") ?></a>
-</div>
-
<div class="context" id="ctx_otheractions" style="display:none">
<a id="previewtoggle"><span class="contextImg"></span><?php echo ($prefs->getValue('dimp_show_preview') ? _("Hide Preview") : _("Show Preview")); ?></a>
<div class="sep"></div>
<if:show_reply_all><li><tag:show_reply_all /></li></if:show_reply_all>
</ul>
</li>
- <li><tag:forward />
- <ul>
- <li><tag:forwardall /></li>
- <li><tag:forwardbody /></li>
- <li><tag:forwardattachments /></li>
- </ul>
- </li>
+ <li><tag:forward /></li>
<li><tag:redirect /></li>
</if:reply>
<if:show_thread><li><tag:show_thread /></li></if:show_thread>
#ctx_reply_reply span.contextImg, #ctx_reply_reply_all span.contextImg, #ctx_reply_reply_list span.contextImg {
background-image: url("graphics/replyall.png");
}
-#ctx_message_forward span.contextImg, #ctx_forward_forward_all span.contextImg, #ctx_forward_forward_body span.contextImg, #ctx_forward_forward_attachments span.contextImg {
+#ctx_message_forward span.contextImg {
background-image: url("graphics/forward.png");
}
#ctx_folder_empty span.contextImg, #ctx_message_deleted span.contextImg, #ctx_draft_deleted span.contextImg, #oa_purge_deleted span.contextImg {
#ctx_reply_reply span.contextImg, #ctx_reply_reply_all span.contextImg, #ctx_reply_reply_list span.contextImg {
background-image: url("graphics/replyall.png");
}
-#ctx_message_forward span.contextImg, #ctx_forward_forward_all span.contextImg, #ctx_forward_forward_body span.contextImg, #ctx_forward_forward_attachments span.contextImg {
+#ctx_message_forward span.contextImg {
background-image: url("graphics/forward.png");
}
#ctx_folder_empty span.contextImg, #ctx_message_deleted span.contextImg, #ctx_draft_deleted span.contextImg, #oa_purge_deleted span.contextImg {