summaryrefslogtreecommitdiff
path: root/db-prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-05-19 07:07:33 +0100
committerAndrew Dolgov <[email protected]>2006-05-19 07:07:33 +0100
commit1503d39768b66371df56d3e8a22c132edbd872ab (patch)
treeb725fc0500a63979b6da37552a53e3afb1b2325d /db-prefs.php
parent5a9aebec093e25339dd5544034139506fc8d7499 (diff)
disable prefs cache in single user mode, as there is no visible way to clean it
Diffstat (limited to 'db-prefs.php')
-rw-r--r--db-prefs.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/db-prefs.php b/db-prefs.php
index eeadef892..a33dee80d 100644
--- a/db-prefs.php
+++ b/db-prefs.php
@@ -2,7 +2,7 @@
require_once "config.php";
require_once "db.php";
- if (!defined('DISABLE_SESSIONS')) {
+ if (!defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
if (!$_SESSION["prefs_cache"])
$_SESSION["prefs_cache"] = array();
}
@@ -18,7 +18,7 @@
$prefs_cache = false;
}
- if (!defined('DISABLE_SESSIONS')) {
+ if (!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"]);
@@ -39,7 +39,7 @@
$value = db_fetch_result($result, 0, "value");
$type_name = db_fetch_result($result, 0, "type_name");
- if (!defined('DISABLE_SESSIONS')) {
+ if (!defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
if ($user_id = $_SESSION["uid"]) {
$_SESSION["prefs_cache"][$pref_name]["type"] = $type_name;
$_SESSION["prefs_cache"][$pref_name]["value"] = $value;