From d907d066f2e0d7974766370b11dab69a59962f97 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 15 Mar 2006 13:03:57 +0000 Subject: - adding ability to assign moderator specific ban options - fixing destroying of sql caches - fixing referencing of sql cached queries if more than one are active on one page - other fixes git-svn-id: file:///svn/phpbb/trunk@5633 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_module.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_module.php') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index b7af1c4b17..cbd689a3ff 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -209,7 +209,7 @@ class p_master /** * Check module authorisation - * @todo implement $this->is_module_id + * @todo Have a look at the eval statement and replace with other code... */ function module_auth($module_auth) { @@ -291,7 +291,7 @@ class p_master */ function load_active($mode = false) { - global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID; + global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $user; $module_path = $phpbb_root_path . 'includes/' . $this->p_class; $icat = request_var('icat', ''); @@ -322,7 +322,14 @@ class p_master $this->module = new $instance($this); // We pre-define the action parameter we are using all over the place - $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + if (defined('IN_ADMIN')) + { + $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + } + else + { + $this->module->u_action = "{$phpbb_root_path}{$user->page['page_dir']}{$user->page['page_name']}$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + } // Execute the main method for the new instance, we send the module // id and mode as parameters -- cgit v1.2.1