From b262c5208d07f9d191cc6cb1dc3cbe5b2da9c89b Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 11 Jul 2008 07:41:14 +0000 Subject: [PATCH] Allow plugins to have buttons that don't need message selections to work on the mailbox list page git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13230 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 29a3b340..fecbefe9 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1490,7 +1490,14 @@ function handleMessageListForm($imapConnection, &$aMailbox, $sButton='', sqimap_run_command($imapConnection,'CLOSE',false,$result,$message); $aMailbox = sqm_api_mailbox_select($imapConnection,$iAccount, $aMailbox['NAME'],array(),array()); } else { - if ($sButton) { + // this is the same hook as above, but here it is called in the + // context of not having had any messages selected and if any + // plugin handles the situation, it should return TRUE so we + // know this was not an erroneous user action + // + global $null; + if (!boolean_hook_function('mailbox_display_button_action', $null, 1) + && $sButton) { $sError = _("No messages were selected."); } } -- 2.25.1