aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-03-16 21:59:42 +0800
committerrxu <rxu@mail.ru>2014-03-17 23:28:51 +0800
commit378cfd6e1687fe645c1fc98afc9d8e0193309f17 (patch)
tree17856305811f5b29b39e68349f71b010cda99ae8 /phpBB/mcp.php
parent325931a56bcaf23fb8bb3e1e3395ed739714f5d9 (diff)
downloadforums-378cfd6e1687fe645c1fc98afc9d8e0193309f17.tar
forums-378cfd6e1687fe645c1fc98afc9d8e0193309f17.tar.gz
forums-378cfd6e1687fe645c1fc98afc9d8e0193309f17.tar.bz2
forums-378cfd6e1687fe645c1fc98afc9d8e0193309f17.tar.xz
forums-378cfd6e1687fe645c1fc98afc9d8e0193309f17.zip
[ticket/12278] Add mcp.php core event to allow to modify modules display option
This event allows extensions to set display option for custom MCP modules for extensions which add custom MCP modules and some of them should be displayed conditionally. PHPBB3-12278
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 24a7bebeba..3fc89ba01b 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -252,6 +252,23 @@ if (!$user_id && $username == '')
$module->set_display('warn', 'warn_user', false);
}
+/**
+* This event allows you to set display option for custom MCP modules
+*
+* @event core.modify_mcp_modules_display_option
+* @var p_master module Module system class
+* @var string mode MCP mode
+* @var int user_id User id
+* @var int forum_id Forum id
+* @var int topic_id Topic id
+* @var int post_id Post id
+* @var string username User name
+* @var int id Parent module id
+* @since 3.1.0-b2
+*/
+$vars = array('module', 'mode', 'user_id', 'forum_id', 'topic_id', 'post_id', 'username', 'id');
+extract($phpbb_dispatcher->trigger_event('core.modify_mcp_modules_display_option', compact($vars)));
+
// Load and execute the relevant module
$module->load_active();