]> git.wh0rd.org - tt-rss.git/blobdiff - public.php
set csrf and access_level in single user mode session
[tt-rss.git] / public.php
index 2cec82962b786a6f75b544d3b0da52520f9e5fcb..8ffc83224f170a51c3a89f175848e6bccdb291f4 100644 (file)
@@ -1,5 +1,6 @@
 <?php
-       set_include_path(get_include_path() . PATH_SEPARATOR . "include");
+       set_include_path(get_include_path() . PATH_SEPARATOR . 
+               dirname(__FILE__) . "/include");
 
        /* remove ill effects of magic quotes */
 
 
        $handler = new Public_Handler($link, $_REQUEST);
 
-       if ($handler) {
-               if ($handler->before()) {
-                       if ($method && method_exists($handler, $method)) {
-                               $handler->$method();
-                       } else if (method_exists($handler, 'index')) {
-                               $handler->index();
-                       }
-                       $handler->after();
-                       return;
+       if ($handler->before($method)) {
+               if ($method && method_exists($handler, $method)) {
+                       $handler->$method();
+               } else if (method_exists($handler, 'index')) {
+                       $handler->index();
                }
+               $handler->after();
+               return;
        }
 
        header("Content-Type: text/plain");