]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Router.php
Renames Awesomeplete dollar variable to avoid conflicts with jQuery
[github/shaarli/Shaarli.git] / application / Router.php
index 0c813847b282162c40e61ae6a2e16e83a34d3508..a1e594a0846b529eedb06dd5ee02c1701b2dc095 100644 (file)
@@ -15,6 +15,10 @@ class Router
 
     public static $PAGE_DAILY = 'daily';
 
+    public static $PAGE_FEED_ATOM = 'atom';
+
+    public static $PAGE_FEED_RSS = 'rss';
+
     public static $PAGE_TOOLS = 'tools';
 
     public static $PAGE_CHANGEPASSWORD = 'changepasswd';
@@ -35,6 +39,10 @@ class Router
 
     public static $PAGE_LINKLIST = 'linklist';
 
+    public static $PAGE_PLUGINSADMIN = 'pluginadmin';
+
+    public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin';
+
     /**
      * Reproducing renderPage() if hell, to avoid regression.
      *
@@ -45,7 +53,7 @@ class Router
      * @param array  $get      $_SERVER['GET'].
      * @param bool   $loggedIn true if authenticated user.
      *
-     * @return self::page found.
+     * @return string page found.
      */
     public static function findPage($query, $get, $loggedIn)
     {
@@ -75,6 +83,14 @@ class Router
             return self::$PAGE_DAILY;
         }
 
+        if (startsWith($query, 'do='. self::$PAGE_FEED_ATOM)) {
+            return self::$PAGE_FEED_ATOM;
+        }
+
+        if (startsWith($query, 'do='. self::$PAGE_FEED_RSS)) {
+            return self::$PAGE_FEED_RSS;
+        }
+
         // At this point, only loggedin pages.
         if (!$loggedIn) {
             return self::$PAGE_LINKLIST;
@@ -112,6 +128,14 @@ class Router
             return self::$PAGE_IMPORT;
         }
 
+        if (startswith($query, 'do='. self::$PAGE_PLUGINSADMIN)) {
+            return self::$PAGE_PLUGINSADMIN;
+        }
+
+        if (startswith($query, 'do='. self::$PAGE_SAVE_PLUGINSADMIN)) {
+            return self::$PAGE_SAVE_PLUGINSADMIN;
+        }
+
         return self::$PAGE_LINKLIST;
     }
 }
\ No newline at end of file