From 392a14464049404e8bb86753bd26b43d3ea90e78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 27 May 2022 15:10:40 +0200 Subject: [PATCH] Stop calling RequestHandler::inRescueMode() --- .../install/files/lib/acp/form/LoginForm.class.php | 9 ++------- .../files/lib/system/request/LinkHandler.class.php | 14 +++++--------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index 83a78b383d..2aa01256f9 100755 --- a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php @@ -13,7 +13,6 @@ use wcf\system\exception\NamedUserException; use wcf\system\exception\UserInputException; use wcf\system\request\LinkHandler; use wcf\system\request\RequestHandler; -use wcf\system\request\RouteHandler; use wcf\system\user\authentication\EmailUserAuthentication; use wcf\system\user\authentication\event\UserLoggedIn; use wcf\system\user\authentication\UserAuthenticationFactory; @@ -252,12 +251,8 @@ class LoginForm extends AbstractCaptchaForm if (!empty($this->url)) { HeaderUtil::redirect($this->url); } else { - if (RequestHandler::getInstance()->inRescueMode()) { - $path = RouteHandler::getHost() . RouteHandler::getPath(); - } else { - $application = ApplicationHandler::getInstance()->getActiveApplication(); - $path = $application->getPageURL() . 'acp/'; - } + $application = ApplicationHandler::getInstance()->getActiveApplication(); + $path = $application->getPageURL() . 'acp/'; HeaderUtil::redirect($path); } diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 6b78b7e0c8..a12c8640e2 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -250,17 +250,13 @@ class LinkHandler extends SingletonFactory if (!PACKAGE_ID) { $url = RouteHandler::getHost() . RouteHandler::getPath(['acp']) . ($isACP ? 'acp/' : '') . $url; } else { - if (RequestHandler::getInstance()->inRescueMode()) { - $pageURL = RouteHandler::getHost() . \str_replace('//', '/', RouteHandler::getPath(['acp'])); - } else { - $application = ApplicationHandler::getInstance()->getApplication($abbreviation); - if ($application === null) { - throw new \InvalidArgumentException("Unknown application identifier '{$abbreviation}'."); - } - - $pageURL = $application->getPageURL(); + $application = ApplicationHandler::getInstance()->getApplication($abbreviation); + if ($application === null) { + throw new \InvalidArgumentException("Unknown application identifier '{$abbreviation}'."); } + $pageURL = $application->getPageURL(); + $url = $pageURL . ($isACP ? 'acp/' : '') . $url; } -- 2.20.1