X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Fpluginhandler.php;h=d10343e095057801bca90d5727760df497845a10;hb=50052fb78a3a9d1bb3fa488e7fd7b23125c38124;hp=eb859ab323ce26d920b8af025070ce1be5947704;hpb=ef1162593f6aec45831dd458cec915e35f84bb09;p=tt-rss.git diff --git a/classes/pluginhandler.php b/classes/pluginhandler.php index eb859ab3..d10343e0 100644 --- a/classes/pluginhandler.php +++ b/classes/pluginhandler.php @@ -5,20 +5,16 @@ class PluginHandler extends Handler_Protected { } function catchall($method) { - global $pluginhost; - - $plugin = $pluginhost->get_plugin($_REQUEST["plugin"]); + $plugin = PluginHost::getInstance()->get_plugin(clean($_REQUEST["plugin"])); if ($plugin) { if (method_exists($plugin, $method)) { $plugin->$method(); } else { - print json_encode(array("error" => "METHOD_NOT_FOUND")); + print error_json(13); } } else { - print json_encode(array("error" => "PLUGIN_NOT_FOUND")); + print error_json(14); } } } - -?>