mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge branch '3.1.x'
* 3.1.x: [ticket/14343] Add event when locking/unlocking posts/topics
This commit is contained in:
commit
434a04344e
1 changed files with 16 additions and 0 deletions
|
@ -327,6 +327,22 @@ function lock_unlock($action, $ids)
|
|||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions after locking/unlocking posts/topics
|
||||
*
|
||||
* @event core.mcp_lock_unlock_after
|
||||
* @var string action Variable containing the action we perform on the posts/topics ('lock', 'unlock', 'lock_post' or 'unlock_post')
|
||||
* @var array ids Array containing the post/topic IDs that have been locked/unlocked
|
||||
* @var array data Array containing posts/topics data
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'ids',
|
||||
'data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_lock_unlock_after', compact($vars)));
|
||||
|
||||
$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
|
||||
|
||||
meta_refresh(2, $redirect);
|
||||
|
|
Loading…
Add table
Reference in a new issue