From 67f4864c7a84065ad9aac8ce897681f38e35b5c0 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 19 Jun 2003 13:19:39 +0000 Subject: [PATCH] Add new method ... allow grab of options for all forums ... useful for e.g. when forums where post count is incremented are required git-svn-id: file:///svn/phpbb/trunk@4142 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/session.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 1fb3e88b70..3821f21579 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -589,9 +589,34 @@ class auth } } + // Needs to change ... check founder status when updating cache? return ($this->founder) ? true : $cache[$f][$opt]; } + function acl_getf($opt) + { + static $cache; + + if (isset($this->acl_options['local'][$opt])) + { + foreach ($this->acl['local'] as $f => $bitstring) + { + if (!isset($cache[$opt][$f])) + { + $cache[$opt][$f] = false; + + $cache[$opt][$f] = $bitstring{$this->acl_options['local'][$opt]}; + if (isset($this->acl_options['global'][$opt])) + { + $cache[$opt][$f] |= $this->acl['global']{$this->acl_options['global'][$opt]}; + } + } + } + } + + return $cache[$opt]; + } + function acl_gets() { $args = func_get_args();