From 203f9c24d4c8aea289b4dbb3515bcb5309ae8228 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 26 Oct 2014 07:44:44 +0000 Subject: [PATCH 1/5] [ticket/13141] Implement core.mcp_global_f_read_auth_after PHPBB3-13141 --- phpBB/mcp.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 25765b1af7..089f85265d 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -136,6 +136,19 @@ if ($forum_id && !$auth->acl_get('f_read', $forum_id)) { trigger_error('NOT_AUTHORISED'); } +/** +* Allow applying additional permissions to MCP access besides f_read +* +* @event core.mcp_global_f_read_auth_after +* @var string topic_id The topic the user tried to access +* @var array forum_id The forum the user tried to access +* @since 3.1.0-RC5 +*/ +$vars = array( + 'topic_id', + 'forum_id', +); +extract($phpbb_dispatcher->trigger_event('core.mcp_global_f_read_auth_after', compact($vars))); if ($forum_id) { From 1fc7bd107d8940fd754d8a683f6f58f05f122ccb Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 26 Oct 2014 07:44:44 +0000 Subject: [PATCH 2/5] [ticket/13141] Ups wrong version PHPBB3-13141 --- phpBB/mcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 089f85265d..737f4b4cc6 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -142,7 +142,7 @@ if ($forum_id && !$auth->acl_get('f_read', $forum_id)) * @event core.mcp_global_f_read_auth_after * @var string topic_id The topic the user tried to access * @var array forum_id The forum the user tried to access -* @since 3.1.0-RC5 +* @since 3.1.1-RC1 */ $vars = array( 'topic_id', From 88798b35147986d225e395f6ddbc3e344015d939 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 28 Nov 2014 15:04:31 +0000 Subject: [PATCH 3/5] [ticket/13141] Adding more variables to the event Adding action, forum_id, mode, module and quickmod to core.mcp_global_f_read_auth_after PHPBB3-13141 --- phpBB/mcp.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 737f4b4cc6..8fbfb31e14 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -140,13 +140,21 @@ if ($forum_id && !$auth->acl_get('f_read', $forum_id)) * Allow applying additional permissions to MCP access besides f_read * * @event core.mcp_global_f_read_auth_after -* @var string topic_id The topic the user tried to access -* @var array forum_id The forum the user tried to access +* @var string action The action the user tried to execute +* @var int forum_id The forum the user tried to access +* @var string mode The MCP module the user is trying to access +* @var p_master module Module system class +* @var bool quickmod True if the user is accessing using quickmod tools +* @var int topic_id The topic the user tried to access * @since 3.1.1-RC1 */ $vars = array( - 'topic_id', + 'action', 'forum_id', + 'mode', + 'module', + 'quickmod', + 'topic_id', ); extract($phpbb_dispatcher->trigger_event('core.mcp_global_f_read_auth_after', compact($vars))); From bc7db0ae168e5e6e9965decdb55c1bf7c2825377 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 28 Nov 2014 15:05:20 +0000 Subject: [PATCH 4/5] [ticket/13141] BUMPing version to 3.1.3 PHPBB3-13141 --- phpBB/mcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 8fbfb31e14..1667c434fb 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -146,7 +146,7 @@ if ($forum_id && !$auth->acl_get('f_read', $forum_id)) * @var p_master module Module system class * @var bool quickmod True if the user is accessing using quickmod tools * @var int topic_id The topic the user tried to access -* @since 3.1.1-RC1 +* @since 3.1.3-RC1 */ $vars = array( 'action', From fe1f7beaf8892901dcbd112a18ff4d9c3ba60cd7 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 29 Nov 2014 10:40:35 +0000 Subject: [PATCH 5/5] [ticket/13142] Extra space before the comment block PHPBB3-13142 --- phpBB/mcp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 1667c434fb..f9d46db528 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -136,6 +136,7 @@ if ($forum_id && !$auth->acl_get('f_read', $forum_id)) { trigger_error('NOT_AUTHORISED'); } + /** * Allow applying additional permissions to MCP access besides f_read *