From: Tim Düsterhus Date: Fri, 27 May 2022 13:10:40 +0000 (+0200) Subject: Stop calling RequestHandler::inRescueMode() X-Git-Tag: 6.0.0_Alpha_1~1244^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=392a14464049404e8bb86753bd26b43d3ea90e78;p=GitHub%2FWoltLab%2FWCF.git Stop calling RequestHandler::inRescueMode() --- 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; }