]> git.wh0rd.org - tt-rss.git/blobdiff - public.php
implement plugin routing masks, add example plugin
[tt-rss.git] / public.php
index 59e0ef2e3696082acbc9cb9ab2f017a60817747d..4cf7653f99a376223e099bb4cab4a6a1f4203cf7 100644 (file)
 
        $method = $_REQUEST["op"];
 
-       $handler = new Handler_Public($link, $_REQUEST);
+       global $pluginhost;
+       $override = $pluginhost->lookup_handler("public", $method);
 
-       if ($handler->before($method)) {
+       if ($override) {
+               $handler = $override;
+       } else {
+               $handler = new Handler_Public($link, $_REQUEST);
+       }
+
+       if (implements_interface($handler, "IHandler") && $handler->before($method)) {
                if ($method && method_exists($handler, $method)) {
                        $handler->$method();
                } else if (method_exists($handler, 'index')) {