add missing DISABLE_SESSIONS checks
This commit is contained in:
parent
3560a0be1d
commit
658e1cc10c
19
db-prefs.php
19
db-prefs.php
|
@ -17,10 +17,12 @@
|
||||||
$user_id = sprintf("%d", $user_id);
|
$user_id = sprintf("%d", $user_id);
|
||||||
$prefs_cache = false;
|
$prefs_cache = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
|
if (!defined('DISABLE_SESSIONS')) {
|
||||||
$tuple = $_SESSION["prefs_cache"][$pref_name];
|
if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
|
||||||
return convert_pref_type($tuple["value"], $tuple["type"]);
|
$tuple = $_SESSION["prefs_cache"][$pref_name];
|
||||||
|
return convert_pref_type($tuple["value"], $tuple["type"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = db_query($link, "SELECT
|
$result = db_query($link, "SELECT
|
||||||
|
@ -37,10 +39,13 @@
|
||||||
$value = db_fetch_result($result, 0, "value");
|
$value = db_fetch_result($result, 0, "value");
|
||||||
$type_name = db_fetch_result($result, 0, "type_name");
|
$type_name = db_fetch_result($result, 0, "type_name");
|
||||||
|
|
||||||
if ($user_id = $_SESSION["uid"]) {
|
if (!defined('DISABLE_SESSIONS')) {
|
||||||
$_SESSION["prefs_cache"][$pref_name]["type"] = $type_name;
|
if ($user_id = $_SESSION["uid"]) {
|
||||||
$_SESSION["prefs_cache"][$pref_name]["value"] = $value;
|
$_SESSION["prefs_cache"][$pref_name]["type"] = $type_name;
|
||||||
|
$_SESSION["prefs_cache"][$pref_name]["value"] = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return convert_pref_type($value, $type_name);
|
return convert_pref_type($value, $type_name);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue