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/includes/functions_module.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index fe9bcdb9d1..d0d09fe9fb 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -480,13 +480,15 @@ class p_master */ function set_active($id = false, $mode = false) { + global $request; + $icat = false; $this->active_module = false; - if (request_var('icat', '')) + if ($request->variable('icat', '')) { $icat = $id; - $id = request_var('icat', ''); + $id = $request->variable('icat', ''); } // Restore the backslashes in class names @@ -553,10 +555,10 @@ class p_master */ function load_active($mode = false, $module_url = false, $execute_module = true) { - global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template; + global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template, $request; $module_path = $this->include_path . $this->p_class; - $icat = request_var('icat', ''); + $icat = $request->variable('icat', ''); if ($this->active_module === false) { -- cgit v1.2.1 From 73e6e5b77faadbb7676961bf38122d669de111db Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 17:50:29 +0100 Subject: [ticket/13454] Remove unused variables This is the first part of the changes. More to come. PHPBB3-13454 --- phpBB/includes/functions_module.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 144e6b4e7c..2e715d5e87 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -82,8 +82,8 @@ class p_master */ function list_modules($p_class) { - global $auth, $db, $user, $cache; - global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher; + global $db, $user, $cache; + global $phpbb_dispatcher; // Sanitise for future path use, it's escaped as appropriate for queries $this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class)); -- cgit v1.2.1 From f50ba9ab4f6e74e4d472c9e2012dfdd29720dfe9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 18:19:02 +0100 Subject: [ticket/13454] Remove unused variables This is part 2 of the pr. PHPBB3-13454 --- phpBB/includes/functions_module.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 2e715d5e87..c6ee1838be 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -387,8 +387,7 @@ class p_master */ static function module_auth($module_auth, $forum_id) { - global $auth, $config; - global $request, $phpbb_extension_manager, $phpbb_dispatcher; + global $phpbb_dispatcher; $module_auth = trim($module_auth); -- cgit v1.2.1 From 6c25ad48224e71b080e04a79dfd47b711164e0f8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 4 Dec 2015 11:02:59 +0100 Subject: [ticket/13454] Remove unused variables Part 3 should fix tests up a little bit again. PHPBB3-13454 --- phpBB/includes/functions_module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index c6ee1838be..2e715d5e87 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -387,7 +387,8 @@ class p_master */ static function module_auth($module_auth, $forum_id) { - global $phpbb_dispatcher; + global $auth, $config; + global $request, $phpbb_extension_manager, $phpbb_dispatcher; $module_auth = trim($module_auth); -- cgit v1.2.1 From 266576c6a4224f4b803040c678020e825a1510b5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 4 Dec 2015 11:50:39 +0100 Subject: [ticket/13454] Remove unused variables Part 4 PHPBB3-13454 --- phpBB/includes/functions_module.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 2e715d5e87..7a1991d69a 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -729,8 +729,6 @@ class p_master */ function get_parents($parent_id, $left_id, $right_id, &$all_parents) { - global $db; - $parents = array(); if ($parent_id > 0) @@ -822,7 +820,7 @@ class p_master // Make sure the module_url has a question mark set, effectively determining the delimiter to use $delim = (strpos($module_url, '?') === false) ? '?' : '&'; - $current_padding = $current_depth = 0; + $current_depth = 0; $linear_offset = 'l_block1'; $tabular_offset = 't_block2'; -- cgit v1.2.1