X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=public.php;h=33f5af75713df54fad835da2bed0c3085428a223;hb=c625a17ebb4366e2b51fffdaff1846098211989f;hp=a17fa5959fa24c68d2e14b7bb248c65b11de24ec;hpb=0d421af86fdfe270e7396f308cf53f3b908e3d74;p=tt-rss.git diff --git a/public.php b/public.php index a17fa595..33f5af75 100644 --- a/public.php +++ b/public.php @@ -1,6 +1,6 @@ lookup_handler("public", $method); + + if ($override) { + $handler = $override; + } else { + $handler = new Handler_Public($_REQUEST); + } - if ($handler->before($method)) { + if (implements_interface($handler, "IHandler") && $handler->before($method)) { if ($method && method_exists($handler, $method)) { $handler->$method(); } else if (method_exists($handler, 'index')) { @@ -55,6 +58,4 @@ header("Content-Type: text/plain"); print json_encode(array("error" => array("code" => 7))); - // We close the connection to database. - db_close($link); ?>