From a82dcd420a0b5266c543aa184fc0628f823e1d9f Mon Sep 17 00:00:00 2001 From: alecpl Date: Sat, 5 Dec 2009 19:10:41 +0000 Subject: - Plugin API: added 'message_compose_body' hook (#1486285) --- program/steps/mail/compose.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'program') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 3a8a776fe..2236d5f57 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -444,10 +444,11 @@ function rcmail_compose_body($attrib) // load draft message body else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) $body = rcmail_create_draft_body($body, $isHtml); - } - else if (!empty($_SESSION['compose']['param']['body'])) - { - $body = $_SESSION['compose']['param']['body']; + + $plugin = $RCMAIL->plugins->exec_hook('message_compose_body', + array('body' => $body, 'html' => $isHtml, 'mode' => $compose_mode)); + + $body = $plugin['body']; } $out = $form_start ? "$form_start\n" : ''; -- cgit v1.2.3