mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #2054 from rxu/ticket/12213-1
[ticket/12213] Add MCP events for custom quick moderation options
This commit is contained in:
commit
40c582688b
1 changed files with 4 additions and 4 deletions
|
@ -186,7 +186,7 @@ if ($quickmod)
|
||||||
// If needed, the flag can be set to true within event listener
|
// If needed, the flag can be set to true within event listener
|
||||||
// to indicate that the action was handled properly
|
// to indicate that the action was handled properly
|
||||||
// and to pass by the trigger_error() call below
|
// and to pass by the trigger_error() call below
|
||||||
$break = false;
|
$is_valid_action = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event allows you to add custom quickmod options
|
* This event allows you to add custom quickmod options
|
||||||
|
@ -194,12 +194,12 @@ if ($quickmod)
|
||||||
* @event core.modify_quickmod_options
|
* @event core.modify_quickmod_options
|
||||||
* @var object module Instance of module system class
|
* @var object module Instance of module system class
|
||||||
* @var string action Quickmod option
|
* @var string action Quickmod option
|
||||||
* @var bool break Flag indicating if the action was handled properly
|
* @var bool is_valid_action Flag indicating if the action was handled properly
|
||||||
* @since 3.1.0-a4
|
* @since 3.1.0-a4
|
||||||
*/
|
*/
|
||||||
extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'break'))));
|
extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'is_valid_action'))));
|
||||||
|
|
||||||
if (!$break)
|
if (!$is_valid_action)
|
||||||
{
|
{
|
||||||
trigger_error($user->lang('QUICKMOD_ACTION_NOT_ALLOWED', $action), E_USER_ERROR);
|
trigger_error($user->lang('QUICKMOD_ACTION_NOT_ALLOWED', $action), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue