/* retrieve the check boxes */
$aUid = (isset($msg) && is_array($msg)) ? array_values($msg) : $aUid;
if (count($aUid) && $sButton != 'expunge') {
+
+ // make sure message UIDs are sanitized (BIGINT)
+ foreach ($aUid as $i => $uid)
+ $aUid[$i] = (preg_match('/^[0-9]+$/', $uid) ? $uid : '0');
+
$aUpdatedMsgs = false;
$bExpunge = false;
switch ($sButton) {
break;
default:
// Hook for plugin buttons
- $temp = array(&$sButton, &$aUid);
+ $temp = array(&$sButton, &$aMailbox, $iAccount, $aMailbox['NAME'], &$aUid);
do_hook('mailbox_display_button_action', $temp);
break;
}
// know this was not an erroneous user action
//
global $null;
- $temp = array(&$sButton, $null);
+ $temp = array(&$sButton, &$aMailbox, $iAccount, $aMailbox['NAME'], $null);
if (!boolean_hook_function('mailbox_display_button_action', $temp, 1)
&& $sButton) {
$sError = _("No messages were selected.");