From: Alexander Ebert Date: Sun, 2 Jun 2013 15:07:18 +0000 (+0200) Subject: Forcing application ACP-Login unless no applications available X-Git-Tag: 2.0.0_Beta_3~42^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84c8a777f806dae122b9b9a69c97732ac5554a2b;p=GitHub%2FWoltLab%2FWCF.git Forcing application ACP-Login unless no applications available --- diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index c6cf6321ec..3be61ed022 100755 --- a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php @@ -5,6 +5,7 @@ use wcf\form\AbstractForm; use wcf\system\application\ApplicationHandler; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; +use wcf\system\request\RouteHandler; use wcf\system\user\authentication\EmailUserAuthentication; use wcf\system\user\authentication\UserAuthenticationFactory; use wcf\system\WCF; @@ -53,6 +54,11 @@ class LoginForm extends AbstractForm { if (WCF::getUser()->userID) { throw new PermissionDeniedException(); } + else if (PACKAGE_ID == 1 && PACKAGE_ID != ApplicationHandler::getInstance()->getPrimaryApplication()->packageID) { + $application = ApplicationHandler::getInstance()->getPrimaryApplication(); + HeaderUtil::redirect(RouteHandler::getProtocol() . $application->domainName . $application->domainPath . 'acp/index.php/Login/'); + exit; + } parent::__run(); }