const HOOK_HEADLINE_TOOLBAR_BUTTON = 17;
const HOOK_HOTKEY_INFO = 18;
const HOOK_ARTICLE_LEFT_BUTTON = 19;
+ const HOOK_PREFS_EDIT_FEED = 20;
+ const HOOK_PREFS_SAVE_FEED = 21;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
function __construct() {
$this->dbh = Db::get();
- $this->storage = $_SESSION["plugin_storage"];
- if (!$this->storage) $this->storage = array();
+ $this->storage = array();
}
private function __clone() {
}
}
- function del_handler($handler, $method) {
+ function del_handler($handler, $method, $sender) {
$handler = str_replace("-", "_", strtolower($handler));
$method = strtolower($method);
}
function load_data($force = false) {
- if ($this->owner_uid && (!$_SESSION["plugin_storage"] || $force)) {
- $plugin = $this->dbh->escape_string($plugin);
-
+ if ($this->owner_uid) {
$result = $this->dbh->query("SELECT name, content FROM ttrss_plugin_storage
WHERE owner_uid = '".$this->owner_uid."'");
while ($line = $this->dbh->fetch_assoc($result)) {
$this->storage[$line["name"]] = unserialize($line["content"]);
}
-
- $_SESSION["plugin_storage"] = $this->storage;
}
}
$this->storage[$idx][$name] = $value;
- $_SESSION["plugin_storage"] = $this->storage;
-
if ($sync) $this->save_data(get_class($sender));
}
$this->dbh->query("DELETE FROM ttrss_plugin_storage WHERE name = '$idx'
AND owner_uid = " . $this->owner_uid);
-
- $_SESSION["plugin_storage"] = $this->storage;
}
}