Skip to content

Commit

Permalink
Update ManageMail.php
Browse files Browse the repository at this point in the history
The hook needs to be called directly after the array is populated.
This is because the default logic that follows, changes the subaction to "browse" if it is not in the array.

Signed-off-by: Chen Zhen <[email protected]>
  • Loading branch information
Underdog-01 authored Jan 20, 2020

Unverified

This user has not yet uploaded their public signing key.
1 parent 0a1c653 commit 7a5299c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/ManageMail.php
Original file line number Diff line number Diff line change
@@ -45,6 +45,8 @@ function ManageMail()
'test' => 'TestMailSend',
);

call_integration_hook('integrate_manage_mail', array(&$subActions));

// By default we want to browse
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'browse';
$context['sub_action'] = $_REQUEST['sa'];
@@ -54,9 +56,7 @@ function ManageMail()
'title' => $txt['mailqueue_title'],
'help' => '',
'description' => $txt['mailqueue_desc'],
);

call_integration_hook('integrate_manage_mail', array(&$subActions));
);

// Call the right function for this sub-action.
call_helper($subActions[$_REQUEST['sa']]);
@@ -523,4 +523,4 @@ function time_since($time_diff)
return sprintf($time_diff == 1 ? $txt['mq_second'] : $txt['mq_seconds'], $time_diff);
}

?>
?>

0 comments on commit 7a5299c

Please sign in to comment.