]> git.wh0rd.org - tt-rss.git/commitdiff
pluginhost: remove session cache for storage
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 28 Apr 2013 14:17:58 +0000 (18:17 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 28 Apr 2013 14:17:58 +0000 (18:17 +0400)
classes/pluginhost.php

index 302fdbaeb9b28c6ef591eaa1dd54f6283a92ed9a..8e2aefcf167ae3584e08ff52e64e3dfa218551e8 100644 (file)
@@ -43,9 +43,8 @@ class PluginHost {
 
        function __construct() {
                $this->dbh = Db::get();
-               $this->storage = $_SESSION["plugin_storage"];
 
-               if (!$this->storage) $this->storage = array();
+               $this->storage = array();
        }
 
        private function __clone() {
@@ -252,7 +251,7 @@ class PluginHost {
        }
 
        function load_data($force = false) {
-               if ($this->owner_uid && (!$_SESSION["plugin_storage"] || $force))  {
+               if ($this->owner_uid)  {
                        $plugin = $this->dbh->escape_string($plugin);
 
                        $result = $this->dbh->query("SELECT name, content FROM ttrss_plugin_storage
@@ -261,8 +260,6 @@ class PluginHost {
                        while ($line = $this->dbh->fetch_assoc($result)) {
                                $this->storage[$line["name"]] = unserialize($line["content"]);
                        }
-
-                       $_SESSION["plugin_storage"] = $this->storage;
                }
        }
 
@@ -302,8 +299,6 @@ class PluginHost {
 
                $this->storage[$idx][$name] = $value;
 
-               $_SESSION["plugin_storage"] = $this->storage;
-
                if ($sync) $this->save_data(get_class($sender));
        }
 
@@ -331,8 +326,6 @@ class PluginHost {
 
                        $this->dbh->query("DELETE FROM ttrss_plugin_storage WHERE name = '$idx'
                                AND owner_uid = " . $this->owner_uid);
-
-                       $_SESSION["plugin_storage"] = $this->storage;
                }
        }