diff options
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r-- | phpBB/includes/functions_module.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 90d59cfd1e..88dafc4300 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -40,7 +40,7 @@ class p_master * Constuctor * Set module include path */ - function p_master($include_path = false) + function __construct($include_path = false) { global $phpbb_root_path; @@ -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)); @@ -243,7 +243,7 @@ class p_master } } - $depth = sizeof($this->module_cache['parents'][$row['module_id']]); + $depth = count($this->module_cache['parents'][$row['module_id']]); // We need to prefix the functions to not create a naming conflict @@ -279,7 +279,7 @@ class p_master 'parent' => (int) $row['parent_id'], 'cat' => ($row['right_id'] > $row['left_id'] + 1) ? true : false, - 'is_duplicate' => ($row['module_basename'] && sizeof($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false, + 'is_duplicate' => ($row['module_basename'] && count($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false, 'name' => (string) $row['module_basename'], 'mode' => (string) $row['module_mode'], @@ -431,7 +431,7 @@ class p_master extract($phpbb_dispatcher->trigger_event('core.module_auth', compact($vars))); $tokens = $match[0]; - for ($i = 0, $size = sizeof($tokens); $i < $size; $i++) + for ($i = 0, $size = count($tokens); $i < $size; $i++) { $token = &$tokens[$i]; @@ -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) { @@ -727,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) @@ -820,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'; |