]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Router.php
Refactor showRSS, and make it use the RSS template
[github/shaarli/Shaarli.git] / application / Router.php
index 1e6a3983231f9a9eff01abb1e88b8dd63a4717b9..d98312b52dc8114781763a0c211c133514005c2b 100644 (file)
@@ -13,6 +13,12 @@ class Router
 
     public static $PAGE_TAGCLOUD = 'tagcloud';
 
+    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';
@@ -33,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.
      *
@@ -69,6 +79,18 @@ class Router
             return self::$PAGE_OPENSEARCH;
         }
 
+        if (startsWith($query, 'do='. self::$PAGE_DAILY)) {
+            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;
@@ -106,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