]> git.wh0rd.org - tt-rss.git/blobdiff - api/index.php
bump VERSION_STATIC due to Dojo changes
[tt-rss.git] / api / index.php
index facdf82c54db587e9cd07f6cb826b6daec494555..d451a3ac8fd53a6620d3d9a70fbc3bf0aadff0d3 100644 (file)
                @session_start();
        }
 
+       startup_gettext();
+
        if (!init_plugins()) return;
 
+       if ($_SESSION["uid"]) {
+               if (!validate_session()) {
+                       header("Content-Type: text/json");
+
+                       print json_encode(array("seq" => -1,
+                               "status" => 1,
+                               "content" => array("error" => "NOT_LOGGED_IN")));
+
+                       return;
+               }
+
+               load_user_plugins( $_SESSION["uid"]);
+       }
+
        $method = strtolower($_REQUEST["op"]);
 
        $handler = new API($_REQUEST);