1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 00:05:56 +00:00

do some warning housekeeping

This commit is contained in:
Andrew Dolgov
2010-11-05 17:16:29 +03:00
parent 3b5ecd1779
commit c3fddd057f
3 changed files with 23 additions and 17 deletions

View File

@@ -11,10 +11,11 @@
$pref_name = db_escape_string($pref_name);
$prefs_cache = true;
$profile = false;
if (!$user_id) {
$user_id = $_SESSION["uid"];
$profile = $_SESSION["profile"];
@$profile = $_SESSION["profile"];
} else {
$user_id = sprintf("%d", $user_id);
$prefs_cache = false;
@@ -29,7 +30,7 @@
if (get_schema_version($link) < 63) $profile_qpart = "";
if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
if ($_SESSION["prefs_cache"] && @$_SESSION["prefs_cache"][$pref_name]) {
$tuple = $_SESSION["prefs_cache"][$pref_name];
return convert_pref_type($tuple["value"], $tuple["type"]);
}
@@ -84,7 +85,7 @@
if (!$user_id) {
$user_id = $_SESSION["uid"];
$profile = $_SESSION["profile"];
@$profile = $_SESSION["profile"];
} else {
$user_id = sprintf("%d", $user_id);
$prefs_cache = false;