aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-01-21 14:33:07 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-01-21 14:33:07 +0000
commit5bea3ea3b430c0e9de46154ecd638092b67dc8eb (patch)
tree9dab17bf316470c693c5cb4d928a1aac2ce9d640 /phpBB/includes/functions_admin.php
parent8c31649706cf4d01c82f1e1b72d806f37359d670 (diff)
downloadforums-5bea3ea3b430c0e9de46154ecd638092b67dc8eb.tar
forums-5bea3ea3b430c0e9de46154ecd638092b67dc8eb.tar.gz
forums-5bea3ea3b430c0e9de46154ecd638092b67dc8eb.tar.bz2
forums-5bea3ea3b430c0e9de46154ecd638092b67dc8eb.tar.xz
forums-5bea3ea3b430c0e9de46154ecd638092b67dc8eb.zip
Re-jiggle where acl_option caching is done, move to common in-keeping with config
git-svn-id: file:///svn/phpbb/trunk@3341 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php67
1 files changed, 1 insertions, 66 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index e6b84cc67c..fd0b53853b 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -688,20 +688,6 @@ class auth_admin extends auth
$this->acl_clear_prefetch();
}
- function acl_clear_prefetch($user_id = false)
- {
- global $db;
-
- $where_sql = ($user_id) ? "WHERE user_id = $user_id" : '';
-
- $sql = "UPDATE " . USERS_TABLE . "
- SET user_permissions = ''
- $where_sql";
- $db->sql_query($sql);
-
- return;
- }
-
// Add a new option to the list ... $options is a hash of form ->
// $options = array(
// 'local' => array('option1', 'option2', ...),
@@ -802,58 +788,7 @@ class auth_admin extends auth
$result = $db->sql_query($sql);
}
- $this->acl_cache_options($options);
- }
-
- function acl_cache_options($options = false)
- {
- global $db, $cache;
-
- $options = array();
-
- if (!$options)
- {
- $sql = "SELECT auth_value, is_global, is_local
- FROM " . ACL_OPTIONS_TABLE . "
- ORDER BY is_global, is_local, auth_value";
- $result = $db->sql_query($sql);
-
- $global = $local = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- if (!empty($row['is_global']))
- {
- $options['global'][$row['auth_value']] = $global++;
- }
- if (!empty($row['is_local']))
- {
- $options['local'][$row['auth_value']] = $local++;
- }
- }
- $db->sql_freeresult($result);
- }
-
-/*
- // Re-cache options
- $cache_str = "\$acl_options = array(\n";
- foreach ($options as $type => $options_ary)
- {
- $cache_str .= "\t'$type' => array(\n";
- foreach ($options_ary as $option_value => $option_id)
- {
- $cache_str .= "\t\t'$option_value' => " . $option_id . ",\n";
- }
- $cache_str .= "\t),\n";
- }
- $cache_str .= ");";
-
- config_cache_write('\$acl_options = array\(.*?\);', $cache_str);
- $this->acl_clear_prefetch();
-*/
- $cache->put('acl_options', $options);
- $this->acl_clear_prefetch();
-
- return $options;
+ $cache->destroy('acl_options');
}
}