Moved various .php file redirects into the LegacyRouter.
This commit is contained in:
parent
c3bed1c0e3
commit
1248c0d2f6
5 changed files with 36 additions and 20 deletions
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Misuzu;
|
|
||||||
|
|
||||||
Tools::redirect($msz->getURLs()->format('auth-login'));
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Misuzu;
|
|
||||||
|
|
||||||
Tools::redirect($msz->getURLs()->format('manage-general-overview'));
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Misuzu;
|
|
||||||
|
|
||||||
Tools::redirect($msz->getURLs()->format('manage-news-categories'));
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Misuzu;
|
|
||||||
|
|
||||||
$authInfo = $msz->getAuthInfo();
|
|
||||||
if(!$authInfo->isLoggedIn())
|
|
||||||
Template::throwError(401);
|
|
||||||
|
|
||||||
Tools::redirect($msz->getURLs()->format('settings-account'));
|
|
|
@ -129,8 +129,44 @@ class LegacyRoutes extends RouteHandler {
|
||||||
}), true);
|
}), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/auth')]
|
||||||
|
#[Route('GET', '/auth/index.php')]
|
||||||
|
public function getAuthIndexPHP($response, $request): void {
|
||||||
|
$response->redirect($this->urls->format('auth-login'), true);
|
||||||
|
}
|
||||||
|
|
||||||
#[Route('GET', '/settings.php')]
|
#[Route('GET', '/settings.php')]
|
||||||
public function getSettingsPHP($response): void {
|
public function getSettingsPHP($response): void {
|
||||||
$response->redirect($this->urls->format('settings-index'), true);
|
$response->redirect($this->urls->format('settings-index'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/settings')]
|
||||||
|
public function getSettingsIndex($response): void {
|
||||||
|
$response->redirect($this->urls->format('settings-account'));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/settings/index.php')]
|
||||||
|
public function getSettingsIndexPHP($response): void {
|
||||||
|
$response->redirect($this->urls->format('settings-account'), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/manage')]
|
||||||
|
public function getManageIndex($response): void {
|
||||||
|
$response->redirect($this->urls->format('manage-general-overview'));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/manage/index.php')]
|
||||||
|
public function getManageIndexPHP($response): void {
|
||||||
|
$response->redirect($this->urls->format('manage-general-overview'), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/manage/news')]
|
||||||
|
public function getManageNewsIndex($response): void {
|
||||||
|
$response->redirect($this->urls->format('manage-news-categories'));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('GET', '/manage/news/index.php')]
|
||||||
|
public function getManageNewsIndexPHP($response): void {
|
||||||
|
$response->redirect($this->urls->format('manage-news-categories'), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue