diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-12-07 21:06:22 +0100 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-12-07 21:06:22 +0100 |
commit | 07ae3e997c72317a0dd3c08be45aa6e760213102 (patch) | |
tree | 8405bb94a9f9db2e40712207ac1c950c3f3293c2 | |
parent | 7eef7b2ea2a62880aafe807a1070c17c96b48a70 (diff) | |
parent | 94c073672d394a88df6715caf3ac5c7d82998109 (diff) | |
download | forums-07ae3e997c72317a0dd3c08be45aa6e760213102.tar forums-07ae3e997c72317a0dd3c08be45aa6e760213102.tar.gz forums-07ae3e997c72317a0dd3c08be45aa6e760213102.tar.bz2 forums-07ae3e997c72317a0dd3c08be45aa6e760213102.tar.xz forums-07ae3e997c72317a0dd3c08be45aa6e760213102.zip |
Merge pull request #4066 from kasimi/ticket/14343
[ticket/14343] Add event when locking/unlocking posts/topics
* kasimi/ticket/14343:
[ticket/14343] Add event when locking/unlocking posts/topics
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index fc28968101..9696605450 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -322,6 +322,22 @@ function lock_unlock($action, $ids) add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']); } + /** + * 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); |