diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 18:15:53 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 18:15:53 +0000 |
commit | ab9ec8064acb25d09d6d0edb93ecbe3b59541010 (patch) | |
tree | 3ffb1cd5767a69f850daba6277f5cf93b91f1d9d /phpBB/includes/functions_module.php | |
parent | 5be570b1f06f342a7f217679d102cdb7724905cf (diff) | |
download | forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.gz forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.bz2 forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.xz forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.zip |
- fixing a bunch of bugs
- moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled.
i hope not having introduced too many new bugs.
git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r-- | phpBB/includes/functions_module.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 549c3bf16d..cacc991c2a 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -214,10 +214,10 @@ class p_master /** * Check module authorisation */ - function module_auth($module_auth) + function module_auth($module_auth, $forum_id = false) { global $auth, $config; - + $module_auth = trim($module_auth); // Generally allowed to access module if module_auth is empty @@ -261,8 +261,12 @@ class p_master // Make sure $id seperation is working fine $module_auth = str_replace(' , ', ',', $module_auth); + $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; + + $test = preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth); + $is_auth = false; - eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $this->acl_forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth) . ');'); + eval('$is_auth = (int) (' . $test . ');'); return $is_auth; } |