summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/pluginhost.php')
-rwxr-xr-xclasses/pluginhost.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 3ff658918..08871af51 100755
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -14,6 +14,7 @@ class PluginHost {
private $plugin_actions = array();
private $owner_uid;
private $last_registered;
+ private $data_loaded;
private static $instance;
const API_VERSION = 2;
@@ -68,6 +69,7 @@ class PluginHost {
const HOOK_ENCLOSURE_IMPORTED = 45;
const HOOK_HEADLINES_CUSTOM_SORT_MAP = 46;
const HOOK_HEADLINES_CUSTOM_SORT_OVERRIDE = 47;
+ const HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM = 48;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
@@ -268,6 +270,8 @@ class PluginHost {
}
}
}
+
+ $this->load_data();
}
function is_system($plugin) {
@@ -352,8 +356,8 @@ class PluginHost {
}
}
- function load_data() {
- if ($this->owner_uid) {
+ private function load_data() {
+ if ($this->owner_uid && !$this->data_loaded && get_schema_version() > 100) {
$sth = $this->pdo->prepare("SELECT name, content FROM ttrss_plugin_storage
WHERE owner_uid = ?");
$sth->execute([$this->owner_uid]);
@@ -361,6 +365,8 @@ class PluginHost {
while ($line = $sth->fetch()) {
$this->storage[$line["name"]] = unserialize($line["content"]);
}
+
+ $this->data_loaded = true;
}
}
@@ -411,6 +417,8 @@ class PluginHost {
function get($sender, $name, $default_value = false) {
$idx = get_class($sender);
+ $this->load_data();
+
if (isset($this->storage[$idx][$name])) {
return $this->storage[$idx][$name];
} else {