aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Router.php
diff options
context:
space:
mode:
authorAurélien Tamisier <virtualtam+github@flibidi.net>2019-01-18 21:26:03 +0100
committerGitHub <noreply@github.com>2019-01-18 21:26:03 +0100
commitff3b5dc5542ec150f0d9b447394364a15e9156d0 (patch)
tree5e926e36816d510e3b3a10e20b94c23f43b55092 /application/Router.php
parent1826e383ecf501302974132fd443cf1ca06e10f6 (diff)
parentdea72c711ff740b3b829d238fcf85648465143a0 (diff)
downloadShaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.tar.gz
Shaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.tar.zst
Shaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.zip
Merge pull request #1248 from virtualtam/refactor/namespacing
Ensure all PHP classes are properly namespaced
Diffstat (limited to 'application/Router.php')
-rw-r--r--application/Router.php43
1 files changed, 22 insertions, 21 deletions
diff --git a/application/Router.php b/application/Router.php
index beb3165b..05877acd 100644
--- a/application/Router.php
+++ b/application/Router.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli;
2 3
3/** 4/**
4 * Class Router 5 * Class Router
@@ -75,43 +76,43 @@ class Router
75 return self::$PAGE_LINKLIST; 76 return self::$PAGE_LINKLIST;
76 } 77 }
77 78
78 if (startsWith($query, 'do='. self::$PAGE_LOGIN) && $loggedIn === false) { 79 if (startsWith($query, 'do=' . self::$PAGE_LOGIN) && $loggedIn === false) {
79 return self::$PAGE_LOGIN; 80 return self::$PAGE_LOGIN;
80 } 81 }
81 82
82 if (startsWith($query, 'do='. self::$PAGE_PICWALL)) { 83 if (startsWith($query, 'do=' . self::$PAGE_PICWALL)) {
83 return self::$PAGE_PICWALL; 84 return self::$PAGE_PICWALL;
84 } 85 }
85 86
86 if (startsWith($query, 'do='. self::$PAGE_TAGCLOUD)) { 87 if (startsWith($query, 'do=' . self::$PAGE_TAGCLOUD)) {
87 return self::$PAGE_TAGCLOUD; 88 return self::$PAGE_TAGCLOUD;
88 } 89 }
89 90
90 if (startsWith($query, 'do='. self::$PAGE_TAGLIST)) { 91 if (startsWith($query, 'do=' . self::$PAGE_TAGLIST)) {
91 return self::$PAGE_TAGLIST; 92 return self::$PAGE_TAGLIST;
92 } 93 }
93 94
94 if (startsWith($query, 'do='. self::$PAGE_OPENSEARCH)) { 95 if (startsWith($query, 'do=' . self::$PAGE_OPENSEARCH)) {
95 return self::$PAGE_OPENSEARCH; 96 return self::$PAGE_OPENSEARCH;
96 } 97 }
97 98
98 if (startsWith($query, 'do='. self::$PAGE_DAILY)) { 99 if (startsWith($query, 'do=' . self::$PAGE_DAILY)) {
99 return self::$PAGE_DAILY; 100 return self::$PAGE_DAILY;
100 } 101 }
101 102
102 if (startsWith($query, 'do='. self::$PAGE_FEED_ATOM)) { 103 if (startsWith($query, 'do=' . self::$PAGE_FEED_ATOM)) {
103 return self::$PAGE_FEED_ATOM; 104 return self::$PAGE_FEED_ATOM;
104 } 105 }
105 106
106 if (startsWith($query, 'do='. self::$PAGE_FEED_RSS)) { 107 if (startsWith($query, 'do=' . self::$PAGE_FEED_RSS)) {
107 return self::$PAGE_FEED_RSS; 108 return self::$PAGE_FEED_RSS;
108 } 109 }
109 110
110 if (startsWith($query, 'do='. self::$PAGE_THUMBS_UPDATE)) { 111 if (startsWith($query, 'do=' . self::$PAGE_THUMBS_UPDATE)) {
111 return self::$PAGE_THUMBS_UPDATE; 112 return self::$PAGE_THUMBS_UPDATE;
112 } 113 }
113 114
114 if (startsWith($query, 'do='. self::$AJAX_THUMB_UPDATE)) { 115 if (startsWith($query, 'do=' . self::$AJAX_THUMB_UPDATE)) {
115 return self::$AJAX_THUMB_UPDATE; 116 return self::$AJAX_THUMB_UPDATE;
116 } 117 }
117 118
@@ -120,23 +121,23 @@ class Router
120 return self::$PAGE_LINKLIST; 121 return self::$PAGE_LINKLIST;
121 } 122 }
122 123
123 if (startsWith($query, 'do='. self::$PAGE_TOOLS)) { 124 if (startsWith($query, 'do=' . self::$PAGE_TOOLS)) {
124 return self::$PAGE_TOOLS; 125 return self::$PAGE_TOOLS;
125 } 126 }
126 127
127 if (startsWith($query, 'do='. self::$PAGE_CHANGEPASSWORD)) { 128 if (startsWith($query, 'do=' . self::$PAGE_CHANGEPASSWORD)) {
128 return self::$PAGE_CHANGEPASSWORD; 129 return self::$PAGE_CHANGEPASSWORD;
129 } 130 }
130 131
131 if (startsWith($query, 'do='. self::$PAGE_CONFIGURE)) { 132 if (startsWith($query, 'do=' . self::$PAGE_CONFIGURE)) {
132 return self::$PAGE_CONFIGURE; 133 return self::$PAGE_CONFIGURE;
133 } 134 }
134 135
135 if (startsWith($query, 'do='. self::$PAGE_CHANGETAG)) { 136 if (startsWith($query, 'do=' . self::$PAGE_CHANGETAG)) {
136 return self::$PAGE_CHANGETAG; 137 return self::$PAGE_CHANGETAG;
137 } 138 }
138 139
139 if (startsWith($query, 'do='. self::$PAGE_ADDLINK)) { 140 if (startsWith($query, 'do=' . self::$PAGE_ADDLINK)) {
140 return self::$PAGE_ADDLINK; 141 return self::$PAGE_ADDLINK;
141 } 142 }
142 143
@@ -148,27 +149,27 @@ class Router
148 return self::$PAGE_DELETELINK; 149 return self::$PAGE_DELETELINK;
149 } 150 }
150 151
151 if (startsWith($query, 'do='. self::$PAGE_PINLINK)) { 152 if (startsWith($query, 'do=' . self::$PAGE_PINLINK)) {
152 return self::$PAGE_PINLINK; 153 return self::$PAGE_PINLINK;
153 } 154 }
154 155
155 if (startsWith($query, 'do='. self::$PAGE_EXPORT)) { 156 if (startsWith($query, 'do=' . self::$PAGE_EXPORT)) {
156 return self::$PAGE_EXPORT; 157 return self::$PAGE_EXPORT;
157 } 158 }
158 159
159 if (startsWith($query, 'do='. self::$PAGE_IMPORT)) { 160 if (startsWith($query, 'do=' . self::$PAGE_IMPORT)) {
160 return self::$PAGE_IMPORT; 161 return self::$PAGE_IMPORT;
161 } 162 }
162 163
163 if (startsWith($query, 'do='. self::$PAGE_PLUGINSADMIN)) { 164 if (startsWith($query, 'do=' . self::$PAGE_PLUGINSADMIN)) {
164 return self::$PAGE_PLUGINSADMIN; 165 return self::$PAGE_PLUGINSADMIN;
165 } 166 }
166 167
167 if (startsWith($query, 'do='. self::$PAGE_SAVE_PLUGINSADMIN)) { 168 if (startsWith($query, 'do=' . self::$PAGE_SAVE_PLUGINSADMIN)) {
168 return self::$PAGE_SAVE_PLUGINSADMIN; 169 return self::$PAGE_SAVE_PLUGINSADMIN;
169 } 170 }
170 171
171 if (startsWith($query, 'do='. self::$GET_TOKEN)) { 172 if (startsWith($query, 'do=' . self::$GET_TOKEN)) {
172 return self::$GET_TOKEN; 173 return self::$GET_TOKEN;
173 } 174 }
174 175