mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 15:15:56 +00:00
db prefs: ignore cache when preference requested for specified UID (in case cached value of a different profile is stored)
prefs: show (and set) enabled plugins for default profile only
This commit is contained in:
@@ -67,7 +67,7 @@ class Db_Prefs {
|
|||||||
$user_id = sprintf("%d", $user_id);
|
$user_id = sprintf("%d", $user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->cache[$pref_name])) {
|
if (isset($this->cache[$pref_name]) && !$user_id) {
|
||||||
$tuple = $this->cache[$pref_name];
|
$tuple = $this->cache[$pref_name];
|
||||||
return $this->convert($tuple["value"], $tuple["type"]);
|
return $this->convert($tuple["value"], $tuple["type"]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -739,7 +739,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||||||
<td width='10%'>".__('Author')."</td></tr>";
|
<td width='10%'>".__('Author')."</td></tr>";
|
||||||
|
|
||||||
$system_enabled = array_map("trim", explode(",", PLUGINS));
|
$system_enabled = array_map("trim", explode(",", PLUGINS));
|
||||||
$user_enabled = array_map("trim", explode(",", get_pref("_ENABLED_PLUGINS")));
|
$user_enabled = array_map("trim", explode(",", get_pref("_ENABLED_PLUGINS", $_SESSION['uid'])));
|
||||||
|
|
||||||
$tmppluginhost = new PluginHost();
|
$tmppluginhost = new PluginHost();
|
||||||
$tmppluginhost->load_all($tmppluginhost::KIND_ALL, $_SESSION["uid"], true);
|
$tmppluginhost->load_all($tmppluginhost::KIND_ALL, $_SESSION["uid"], true);
|
||||||
@@ -949,7 +949,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||||||
else
|
else
|
||||||
$plugins = "";
|
$plugins = "";
|
||||||
|
|
||||||
set_pref("_ENABLED_PLUGINS", $plugins);
|
set_pref("_ENABLED_PLUGINS", $plugins, $_SESSION["uid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearplugindata() {
|
function clearplugindata() {
|
||||||
|
|||||||
Reference in New Issue
Block a user