X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=public.php;h=7aebde78f378c7f1012cf122f2a727b878b9eb1f;hb=81fc862e370a1dfbd3941206fd00076e3cbf0551;hp=bf13fdd583040aa21f82c4226effe4458822b158;hpb=369dbc19d6ae35c97a2306ae4821c7812e2f24b2;p=tt-rss.git diff --git a/public.php b/public.php index bf13fdd5..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')) { @@ -53,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); ?>