]>
Commit | Line | Data |
---|---|---|
19c73507 AD |
1 | <?php |
2 | class PluginHandler extends Handler_Protected { | |
3 | function csrf_ignore($method) { | |
4 | return true; | |
5 | } | |
6 | ||
7 | function catchall($method) { | |
1ffe3391 | 8 | $plugin = PluginHost::getInstance()->get_plugin($_REQUEST["plugin"]); |
19c73507 | 9 | |
aca71915 AD |
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")); | |
19c73507 AD |
18 | } |
19 | } | |
20 | } | |
21 | ||
22 | ?> |