diff options
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/backend.php b/backend.php index 206d866b7..98c8eace6 100644 --- a/backend.php +++ b/backend.php @@ -51,6 +51,11 @@ UserHelper::load_user_plugins($_SESSION["uid"]); } + if (Config::is_migration_needed()) { + print Errors::to_json(Errors::E_SCHEMA_MISMATCH); + return; + } + $purge_intervals = array( 0 => __("Use default"), -1 => __("Never purge"), @@ -96,7 +101,6 @@ $op = "pluginhandler"; } */ - // TODO: figure out if is this still needed $op = str_replace("-", "_", $op); $override = PluginHost::getInstance()->lookup_handler($op, $method); @@ -135,6 +139,9 @@ } else { if (method_exists($handler, "catchall")) { $handler->catchall($method); + } else { + header("Content-Type: text/json"); + print Errors::to_json(Errors::E_UNKNOWN_METHOD, ["info" => get_class($handler) . "->$method"]); } } $handler->after(); @@ -154,6 +161,6 @@ } header("Content-Type: text/json"); - print Errors::to_json(Errors::E_UNKNOWN_METHOD); + print Errors::to_json(Errors::E_UNKNOWN_METHOD, [ "info" => (isset($handler) ? get_class($handler) : "UNKNOWN:".$_REQUEST["op"]) . "->$method"]); ?> |