From f6e06da4c68917dafb057bf7fe19f884a3e148c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Sun, 4 Jan 2015 20:41:04 +0100 Subject: [ticket/13455] Update calls to `request_var()` PHPBB3-13455 --- phpBB/mcp.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'phpBB/mcp.php') diff --git a/phpBB/mcp.php b/phpBB/mcp.php index f9d46db528..db5f87cb83 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -33,10 +33,10 @@ $module = new p_master(); $template->assign_var('S_IN_MCP', true); // Basic parameter data -$id = request_var('i', ''); +$id = $request->variable('i', ''); -$mode = request_var('mode', array('')); -$mode = sizeof($mode) ? array_shift($mode) : request_var('mode', ''); +$mode = $request->variable('mode', array('')); +$mode = sizeof($mode) ? array_shift($mode) : $request->variable('mode', ''); // Only Moderators can go beyond this point if (!$user->data['is_registered']) @@ -50,10 +50,10 @@ if (!$user->data['is_registered']) } $quickmod = (isset($_REQUEST['quickmod'])) ? true : false; -$action = request_var('action', ''); -$action_ary = request_var('action', array('' => 0)); +$action = $request->variable('action', ''); +$action_ary = $request->variable('action', array('' => 0)); -$forum_action = request_var('forum_action', ''); +$forum_action = $request->variable('forum_action', ''); if ($forum_action !== '' && $request->variable('sort', false, false, \phpbb\request\request_interface::POST)) { $action = $forum_action; @@ -71,12 +71,12 @@ if ($mode == 'topic_logs') $quickmod = false; } -$post_id = request_var('p', 0); -$topic_id = request_var('t', 0); -$forum_id = request_var('f', 0); -$report_id = request_var('r', 0); -$user_id = request_var('u', 0); -$username = utf8_normalize_nfc(request_var('username', '', true)); +$post_id = $request->variable('p', 0); +$topic_id = $request->variable('t', 0); +$forum_id = $request->variable('f', 0); +$report_id = $request->variable('r', 0); +$user_id = $request->variable('u', 0); +$username = utf8_normalize_nfc($request->variable('username', '', true)); if ($post_id) { @@ -192,7 +192,7 @@ if ($quickmod) case 'topic_logs': // Reset start parameter if we jumped from the quickmod dropdown - if (request_var('start', 0)) + if ($request->variable('start', 0)) { $request->overwrite('start', 0); } -- cgit v1.2.1 From abcb2680eec86dc8016c489ebc7362e29be9e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Mon, 2 Feb 2015 21:35:46 +0100 Subject: [ticket/13455] Remove unnecessary calls to `utf8_normalize_nfc()` PHPBB3-13455 --- phpBB/mcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/mcp.php') diff --git a/phpBB/mcp.php b/phpBB/mcp.php index db5f87cb83..cb53f4eec9 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -76,7 +76,7 @@ $topic_id = $request->variable('t', 0); $forum_id = $request->variable('f', 0); $report_id = $request->variable('r', 0); $user_id = $request->variable('u', 0); -$username = utf8_normalize_nfc($request->variable('username', '', true)); +$username = $request->variable('username', '', true); if ($post_id) { -- cgit v1.2.1 From 7d31232846e29311e5b76bf32f41f64da7985a79 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 16 Jul 2014 18:31:12 +0200 Subject: [ticket/8708] Apply permission 'f_announce_global' PHPBB3-8708 --- phpBB/mcp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/mcp.php') diff --git a/phpBB/mcp.php b/phpBB/mcp.php index cb53f4eec9..a5fa09ba2b 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -111,8 +111,8 @@ if (!$auth->acl_getf_global('m_')) 'lock' => 'f_user_lock', 'make_sticky' => 'f_sticky', 'make_announce' => 'f_announce', - 'make_global' => 'f_announce', - 'make_normal' => array('f_announce', 'f_sticky') + 'make_global' => 'f_announce_global', + 'make_normal' => array('f_announce', 'f_announce_global', 'f_sticky') ); $allow_user = false; -- cgit v1.2.1 From 4b6c2c8cde0b87d32f8df8af87239580ddc340c4 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 29 May 2016 12:42:57 +0200 Subject: [ticket/10961] Send HTTP 403 when applicable PHPBB3-10961 --- phpBB/mcp.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/mcp.php') diff --git a/phpBB/mcp.php b/phpBB/mcp.php index a5fa09ba2b..a5464f4a73 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -127,6 +127,7 @@ if (!$auth->acl_getf_global('m_')) if (!$allow_user) { + send_status_line(403, 'Forbidden'); trigger_error('NOT_AUTHORISED'); } } @@ -134,6 +135,7 @@ if (!$auth->acl_getf_global('m_')) // if the user cannot read the forum he tries to access then we won't allow mcp access either if ($forum_id && !$auth->acl_get('f_read', $forum_id)) { + send_status_line(403, 'Forbidden'); trigger_error('NOT_AUTHORISED'); } -- cgit v1.2.1 From f8fbe3793680af1dae2db2829cfc84068831c52f Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 28 Jun 2017 00:58:03 +0700 Subject: [ticket/14972] replace all occurrences of sizeof() with the count() PHPBB3-14972 --- phpBB/mcp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/mcp.php') diff --git a/phpBB/mcp.php b/phpBB/mcp.php index a5464f4a73..c4a8a66c18 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -36,7 +36,7 @@ $template->assign_var('S_IN_MCP', true); $id = $request->variable('i', ''); $mode = $request->variable('mode', array('')); -$mode = sizeof($mode) ? array_shift($mode) : $request->variable('mode', ''); +$mode = count($mode) ? array_shift($mode) : $request->variable('mode', ''); // Only Moderators can go beyond this point if (!$user->data['is_registered']) @@ -59,7 +59,7 @@ if ($forum_action !== '' && $request->variable('sort', false, false, \phpbb\requ $action = $forum_action; } -if (sizeof($action_ary)) +if (count($action_ary)) { list($action, ) = each($action_ary); } -- cgit v1.2.1