]>
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) { | |
e6532439 | 8 | $plugin = PluginHost::getInstance()->get_plugin(clean($_REQUEST["plugin"])); |
19c73507 | 9 | |
aca71915 AD |
10 | if ($plugin) { |
11 | if (method_exists($plugin, $method)) { | |
12 | $plugin->$method(); | |
13 | } else { | |
27f7b593 | 14 | print error_json(13); |
aca71915 AD |
15 | } |
16 | } else { | |
27f7b593 | 17 | print error_json(14); |
19c73507 AD |
18 | } |
19 | } | |
20 | } |