X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=blobdiff_plain;f=public.php;h=7aebde78f378c7f1012cf122f2a727b878b9eb1f;hp=675a9e352d9a6a413b60045c661695e82a9c9095;hb=e52034b4bcce994312ce2af31be0a46a70172691;hpb=6a79e8afeb2038fa20796846fd1e2b64113112c3 diff --git a/public.php b/public.php index 675a9e35..7aebde78 100644 --- a/public.php +++ b/public.php @@ -1,6 +1,6 @@ lookup_handler("public", $method); - if ($handler->before($method)) { + if ($override) { + $handler = $override; + } else { + $handler = new Handler_Public($_REQUEST); + } + + if (implements_interface($handler, "IHandler") && $handler->before($method)) { if ($method && method_exists($handler, $method)) { $handler->$method(); } else if (method_exists($handler, 'index')) { @@ -60,8 +56,5 @@ } header("Content-Type: text/plain"); - print json_encode(array("error" => array("code" => 7))); - - // We close the connection to database. - db_close($link); + print error_json(13); ?>