summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-23 09:57:57 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-23 09:57:57 +0000
commit2788862bc46a04bfbc9d4710c39faf169a080a23 (patch)
tree98558f0423ad0554f26012af36a25050262ec529 /roundcubemail/program
parentf35efda9dbd339a4616696c4b05b8ec2a0f550a1 (diff)
- Add part MIME ID to message_part_* hooks (#1487718)
git-svn-id: https://svn.roundcube.net/trunk@4449 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/func.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 720c8ebec..d56f0f335 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -665,7 +665,8 @@ function rcmail_print_body($part, $p = array())
// trigger plugin hook
$data = $RCMAIL->plugins->exec_hook('message_part_before',
- array('type' => $part->ctype_secondary, 'body' => $part->body) + $p + array('safe' => false, 'plain' => false, 'inline_html' => true));
+ array('type' => $part->ctype_secondary, 'body' => $part->body, 'id' => $part->mime_id)
+ + $p + array('safe' => false, 'plain' => false, 'inline_html' => true));
// convert html to text/plain
if ($data['type'] == 'html' && $data['plain']) {
@@ -698,7 +699,8 @@ function rcmail_print_body($part, $p = array())
$body = rcmail_plain_body($body, $part->ctype_parameters['format'] == 'flowed');
// allow post-processing of the message body
- $data = $RCMAIL->plugins->exec_hook('message_part_after', array('type' => $part->ctype_secondary, 'body' => $body) + $data);
+ $data = $RCMAIL->plugins->exec_hook('message_part_after',
+ array('type' => $part->ctype_secondary, 'body' => $body, 'id' => $part->mime_id) + $data);
return $data['type'] == 'html' ? $data['body'] : html::tag('pre', array(), $data['body']);
}