diff options
author | Andrew Dolgov <[email protected]> | 2007-10-30 07:35:16 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-10-30 07:35:16 +0100 |
commit | 70364a420d8bd77e2988dd37b8ee67d4bcbd6fe6 (patch) | |
tree | 786305f54eac47b415eddbf35022a7b2579aadd3 /db-prefs.php | |
parent | 9968d46f88e98b412b4e53658e9e1a6f62448499 (diff) |
get_pref: do not use cache when querying prefs for specific user
Diffstat (limited to 'db-prefs.php')
-rw-r--r-- | db-prefs.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db-prefs.php b/db-prefs.php index 0858c2ce4..f9b57e6b1 100644 --- a/db-prefs.php +++ b/db-prefs.php @@ -10,6 +10,7 @@ function get_pref($link, $pref_name, $user_id = false, $die_on_error = false) { $pref_name = db_escape_string($pref_name); + $prefs_cache = true; if (!$user_id) { $user_id = $_SESSION["uid"]; @@ -18,7 +19,7 @@ $prefs_cache = false; } - if (!defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) { + if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) { if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) { $tuple = $_SESSION["prefs_cache"][$pref_name]; return convert_pref_type($tuple["value"], $tuple["type"]); |