2012-12-23 11:52:18 +01:00
|
|
|
<?php
|
|
|
|
class PluginHandler extends Handler_Protected {
|
|
|
|
function csrf_ignore($method) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function catchall($method) {
|
2017-12-03 21:35:38 +01:00
|
|
|
$plugin = PluginHost::getInstance()->get_plugin(clean($_REQUEST["plugin"]));
|
2012-12-23 11:52:18 +01:00
|
|
|
|
2013-03-16 09:26:14 +01:00
|
|
|
if ($plugin) {
|
|
|
|
if (method_exists($plugin, $method)) {
|
|
|
|
$plugin->$method();
|
|
|
|
} else {
|
2015-03-30 12:02:24 +02:00
|
|
|
print error_json(13);
|
2013-03-16 09:26:14 +01:00
|
|
|
}
|
|
|
|
} else {
|
2015-03-30 12:02:24 +02:00
|
|
|
print error_json(14);
|
2012-12-23 11:52:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|