From 64793f9a1467532b26b07ce8747221e24b7887dd Mon Sep 17 00:00:00 2001 From: pdontthink Date: Mon, 5 Feb 2007 23:23:42 +0000 Subject: [PATCH] Allow override of mail_sent value by plugins git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12223 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/compose.php b/src/compose.php index e774fd82..389ccd83 100644 --- a/src/compose.php +++ b/src/compose.php @@ -492,10 +492,15 @@ if ($send) { $Result = deliverMessage($composeMessage); + if ($Result) + $mail_sent = 'yes'; + else + $mail_sent = 'no'; + // NOTE: this hook changed in 1.5.2 from sending $Result and // $composeMessage as args #2 and #3 to being in an array // under arg #2 - do_hook('compose_send_after', $temp=array(&$Result, &$composeMessage)); + do_hook('compose_send_after', $temp=array(&$Result, &$composeMessage, &$mail_sent)); if (! $Result) { showInputForm($session); exit(); @@ -523,21 +528,21 @@ if ($send) { if ($compose_new_win == '1') { if ( !isset($pageheader_sent) || !$pageheader_sent ) { - Header("Location: $location/compose.php?mail_sent=yes"); + Header("Location: $location/compose.php?mail_sent=$mail_sent"); } else { echo '

' + . '/compose.php?mail_sent=$mail_sent">' . _("Return") . '
'; } exit(); } else { if ( !isset($pageheader_sent) || !$pageheader_sent ) { Header("Location: $location/right_main.php?mailbox=$urlMailbox". - "&startMessage=$startMessage&mail_sent=yes"); + "&startMessage=$startMessage&mail_sent=$mail_sent"); } else { echo '

" + . "&startMessage=$startMessage&mail_sent=$mail_sent\">" . _("Return") . '
'; } exit(); -- 2.25.1