aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Router.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-03-10 18:48:21 +0100
committerArthurHoaro <arthur@hoa.ro>2016-03-18 19:13:48 +0100
commit8395d0b76145969f4b8940a415af5e46528f04a5 (patch)
tree023435f7ba91b33ce7681d14702d74472ea22013 /application/Router.php
parent5f8e6ebc6ac1c7dff36feadb08f7ac71d5b55ec9 (diff)
downloadShaarli-8395d0b76145969f4b8940a415af5e46528f04a5.tar.gz
Shaarli-8395d0b76145969f4b8940a415af5e46528f04a5.tar.zst
Shaarli-8395d0b76145969f4b8940a415af5e46528f04a5.zip
Adds a route for ATOM and RSS feeds page
Diffstat (limited to 'application/Router.php')
-rw-r--r--application/Router.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/application/Router.php b/application/Router.php
index 6185f08e..d98312b5 100644
--- a/application/Router.php
+++ b/application/Router.php
@@ -15,6 +15,10 @@ class Router
15 15
16 public static $PAGE_DAILY = 'daily'; 16 public static $PAGE_DAILY = 'daily';
17 17
18 public static $PAGE_FEED_ATOM = 'atom';
19
20 public static $PAGE_FEED_RSS = 'rss';
21
18 public static $PAGE_TOOLS = 'tools'; 22 public static $PAGE_TOOLS = 'tools';
19 23
20 public static $PAGE_CHANGEPASSWORD = 'changepasswd'; 24 public static $PAGE_CHANGEPASSWORD = 'changepasswd';
@@ -79,6 +83,14 @@ class Router
79 return self::$PAGE_DAILY; 83 return self::$PAGE_DAILY;
80 } 84 }
81 85
86 if (startsWith($query, 'do='. self::$PAGE_FEED_ATOM)) {
87 return self::$PAGE_FEED_ATOM;
88 }
89
90 if (startsWith($query, 'do='. self::$PAGE_FEED_RSS)) {
91 return self::$PAGE_FEED_RSS;
92 }
93
82 // At this point, only loggedin pages. 94 // At this point, only loggedin pages.
83 if (!$loggedIn) { 95 if (!$loggedIn) {
84 return self::$PAGE_LINKLIST; 96 return self::$PAGE_LINKLIST;