]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pluginhandler.php
support disabling of e-mail digests entirely
[tt-rss.git] / classes / pluginhandler.php
index 69030516523a2a88914c64a2d74aa2b68b006524..d10343e095057801bca90d5727760df497845a10 100644 (file)
@@ -5,18 +5,16 @@ class PluginHandler extends Handler_Protected {
        }
 
        function catchall($method) {
-               $plugin = PluginHost::getInstance()->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);
                }
        }
 }
-
-?>