From 9e38434b4a2d487b1d490b5eac5d29750f37656a Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 29 Mar 2003 18:25:41 +0000 Subject: Moved acl_options caching code into acl git-svn-id: file:///svn/phpbb/trunk@3746 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index 2732641de9..ed110a7755 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -109,6 +109,7 @@ define('PRIVMSGS_UNREAD_MAIL', 5); // Table names define('ACL_GROUPS_TABLE', $table_prefix.'auth_groups'); define('ACL_OPTIONS_TABLE', $table_prefix.'auth_options'); +define('ACL_DEPS_TABLE', $table_prefix.'auth_dependencies'); define('ACL_PRESETS_TABLE', $table_prefix.'auth_presets'); define('ACL_USERS_TABLE', $table_prefix.'auth_users'); define('ATTACHMENTS_TABLE', $table_prefix.'attachments'); @@ -197,33 +198,6 @@ else $cache->put('config', $config); } -if (!($acl_options = $cache->get('acl_options'))) -{ - $acl_options = array(); - - $sql = "SELECT auth_value, is_global, is_local - FROM " . ACL_OPTIONS_TABLE . " - ORDER BY auth_option_id"; - $result = $db->sql_query($sql); - - $global = $local = 0; - while ($row = $db->sql_fetchrow($result)) - { - if (!empty($row['is_global'])) - { - $acl_options['global'][$row['auth_value']] = $global++; - } - if (!empty($row['is_local'])) - { - $acl_options['local'][$row['auth_value']] = $local++; - } - } - $db->sql_freeresult($result); - - $cache->put('acl_options', $acl_options); - $auth->acl_clear_prefetch(); -} - /* if (time() - $config['cache_interval'] >= $config['cache_last_gc']) { -- cgit v1.2.1