]> git.wh0rd.org Git - tt-rss.git/commitdiff
more aggressive prefs caching
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 10 Nov 2011 20:55:02 +0000 (00:55 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 10 Nov 2011 20:55:02 +0000 (00:55 +0400)
db-prefs.php
functions.php

index cf941cebe11daab3b53c97e535a78f97e7516a16..7a522d6ada76ea928dfae350271c3607f430fe7a 100644 (file)
@@ -18,7 +18,7 @@
                        @$profile = $_SESSION["profile"];
                } else {
                        $user_id = sprintf("%d", $user_id);
-                       $prefs_cache = false;
+                       //$prefs_cache = false;
                }
 
                if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {
                                        $profile_qpart
                                        AND owner_uid = " . $_SESSION["uid"]);
 
-                       $_SESSION["prefs_cache"] = array();
+                       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;
+                               }
+                       }
 
                }
        }
index 275bc4d8ed365b7fe31ba7074807d8a7ca9cef9a..40e5837658f956dac551c586b29d58256c6a674a 100644 (file)
        }
 
        function login_sequence($link, $mobile = false) {
+               $_SESSION["prefs_cache"] = array();
+
                if (!SINGLE_USER_MODE) {
 
                        $login_action = $_POST["login_action"];