diff options
Diffstat (limited to 'application/legacy')
-rw-r--r-- | application/legacy/LegacyController.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/application/legacy/LegacyController.php b/application/legacy/LegacyController.php index 75fa9d2c..e16dd0f4 100644 --- a/application/legacy/LegacyController.php +++ b/application/legacy/LegacyController.php | |||
@@ -132,4 +132,21 @@ class LegacyController extends ShaarliVisitorController | |||
132 | 132 | ||
133 | return $this->redirect($response, '/feed/' . $feedType . $parameters); | 133 | return $this->redirect($response, '/feed/' . $feedType . $parameters); |
134 | } | 134 | } |
135 | |||
136 | /** Legacy route: ?do=configure */ | ||
137 | protected function configure(Request $request, Response $response): Response | ||
138 | { | ||
139 | $route = '/admin/configure'; | ||
140 | |||
141 | if (!$this->container->loginManager->isLoggedIn()) { | ||
142 | return $this->redirect($response, '/login?returnurl=' . $this->getBasePath() . $route); | ||
143 | } | ||
144 | |||
145 | return $this->redirect($response, $route); | ||
146 | } | ||
147 | |||
148 | protected function getBasePath(): string | ||
149 | { | ||
150 | return $this->container->basePath ?: ''; | ||
151 | } | ||
135 | } | 152 | } |