X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=blobdiff_plain;f=classes%2Fpref%2Fprefs.php;h=b2e7edf03d8797ec403a653ed20624ed7a0ff922;hp=d8b8ecc756841c6704cbb5fc933e6042a3c66d0c;hb=1ffe3391f902c4baa984982f19e61a0e45de21ff;hpb=52d88392dad52ec4d5607fef7479d74dee8b8be4 diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index d8b8ecc7..b2e7edf0 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -79,8 +79,7 @@ class Pref_Prefs extends Handler_Protected { return; } - global $pluginhost; - $authenticator = $pluginhost->get_plugin($_SESSION["auth_module"]); + $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); if (method_exists($authenticator, "change_password")) { print $authenticator->change_password($_SESSION["uid"], $old_pw, $new_pw); @@ -255,10 +254,7 @@ class Pref_Prefs extends Handler_Protected { print ""; if ($_SESSION["auth_module"]) { - global $pluginhost; - - $authenticator = $pluginhost->get_plugin($_SESSION["auth_module"]); - + $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); } else { $authenticator = false; } @@ -436,8 +432,7 @@ class Pref_Prefs extends Handler_Protected { } } - global $pluginhost; - $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION, + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "hook_prefs_tab_section", "prefPrefsAuth"); print ""; #pane @@ -675,8 +670,7 @@ class Pref_Prefs extends Handler_Protected { print ""; - global $pluginhost; - $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION, + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "hook_prefs_tab_section", "prefPrefsPrefsInside"); print ''; # inside pane @@ -712,8 +706,7 @@ class Pref_Prefs extends Handler_Protected { "; */ - global $pluginhost; - $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION, + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "hook_prefs_tab_section", "prefPrefsPrefsOutside"); print ""; @@ -877,8 +870,7 @@ class Pref_Prefs extends Handler_Protected { print ""; #pane - global $pluginhost; - $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB, + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "hook_prefs_tab", "prefPrefs"); print ""; #container @@ -918,8 +910,7 @@ class Pref_Prefs extends Handler_Protected { $password = $_REQUEST["password"]; $otp = $_REQUEST["otp"]; - global $pluginhost; - $authenticator = $pluginhost->get_plugin($_SESSION["auth_module"]); + $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); if ($authenticator->check_password($_SESSION["uid"], $password)) { @@ -951,8 +942,7 @@ class Pref_Prefs extends Handler_Protected { function otpdisable() { $password = $this->dbh->escape_string($_REQUEST["password"]); - global $pluginhost; - $authenticator = $pluginhost->get_plugin($_SESSION["auth_module"]); + $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); if ($authenticator->check_password($_SESSION["uid"], $password)) { @@ -978,8 +968,7 @@ class Pref_Prefs extends Handler_Protected { function clearplugindata() { $name = $this->dbh->escape_string($_REQUEST["name"]); - global $pluginhost; - $pluginhost->clear_data($pluginhost->get_plugin($name)); + PluginHost::getInstance()->clear_data(PluginHost::getInstance()->get_plugin($name)); } function customizeCSS() {