]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | class PluginHandler extends Handler_Protected { | |
3 | function csrf_ignore($method) { | |
4 | return true; | |
5 | } | |
6 | ||
7 | function catchall($method) { | |
8 | $plugin = PluginHost::getInstance()->get_plugin($_REQUEST["plugin"]); | |
9 | ||
10 | if ($plugin) { | |
11 | if (method_exists($plugin, $method)) { | |
12 | $plugin->$method(); | |
13 | } else { | |
14 | print json_encode(array("error" => "METHOD_NOT_FOUND")); | |
15 | } | |
16 | } else { | |
17 | print json_encode(array("error" => "PLUGIN_NOT_FOUND")); | |
18 | } | |
19 | } | |
20 | } | |
21 | ||
22 | ?> |