From c9f67353cfe608247d6b820e5f8534ab2b066227 Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 23 Jan 2011 09:57:57 +0000 Subject: - Add part MIME ID to message_part_* hooks (#1487718) --- program/steps/mail/func.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'program') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 720c8ebec..d56f0f335 100644 --- a/program/steps/mail/func.inc +++ b/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']); } -- cgit v1.2.3