]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Router.php
Fixes #378 - Plugin administration UI.
[github/shaarli/Shaarli.git] / application / Router.php
index 82b2b8582a062240b11f7707daedbe9d41f6721d..6185f08e932c742806135767792d6f3c2cf8e7bc 100644 (file)
@@ -13,6 +13,8 @@ class Router
 
     public static $PAGE_TAGCLOUD = 'tagcloud';
 
+    public static $PAGE_DAILY = 'daily';
+
     public static $PAGE_TOOLS = 'tools';
 
     public static $PAGE_CHANGEPASSWORD = 'changepasswd';
@@ -29,8 +31,14 @@ class Router
 
     public static $PAGE_IMPORT = 'import';
 
+    public static $PAGE_OPENSEARCH = 'opensearch';
+
     public static $PAGE_LINKLIST = 'linklist';
 
+    public static $PAGE_PLUGINSADMIN = 'pluginadmin';
+
+    public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin';
+
     /**
      * Reproducing renderPage() if hell, to avoid regression.
      *
@@ -63,6 +71,14 @@ class Router
             return self::$PAGE_TAGCLOUD;
         }
 
+        if (startswith($query, 'do='. self::$PAGE_OPENSEARCH)) {
+            return self::$PAGE_OPENSEARCH;
+        }
+
+        if (startsWith($query, 'do='. self::$PAGE_DAILY)) {
+            return self::$PAGE_DAILY;
+        }
+
         // At this point, only loggedin pages.
         if (!$loggedIn) {
             return self::$PAGE_LINKLIST;
@@ -100,6 +116,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