1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 04:55:54 +00:00
Files
tt-rss/classes/pluginhandler.php
2013-04-18 12:27:34 +04:00

23 lines
454 B
PHP

<?php
class PluginHandler extends Handler_Protected {
function csrf_ignore($method) {
return true;
}
function catchall($method) {
$plugin = PluginHost::getInstance()->get_plugin($_REQUEST["plugin"]);
if ($plugin) {
if (method_exists($plugin, $method)) {
$plugin->$method();
} else {
print json_encode(array("error" => "METHOD_NOT_FOUND"));
}
} else {
print json_encode(array("error" => "PLUGIN_NOT_FOUND"));
}
}
}
?>