summaryrefslogtreecommitdiff
path: root/classes/pluginhandler.php
blob: 1c9e7aef6e8e37663c65755752268b197bfbe1c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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 error_json(13);
			}
		} else {
			print error_json(14);
		}
	}
}