pluginhandler.php 380 B

1234567891011121314151617181920
  1. <?php
  2. class PluginHandler extends Handler_Protected {
  3. function csrf_ignore($method) {
  4. return true;
  5. }
  6. function catchall($method) {
  7. $plugin = PluginHost::getInstance()->get_plugin($_REQUEST["plugin"]);
  8. if ($plugin) {
  9. if (method_exists($plugin, $method)) {
  10. $plugin->$method();
  11. } else {
  12. print error_json(13);
  13. }
  14. } else {
  15. print error_json(14);
  16. }
  17. }
  18. }