From: Alexander Ebert Date: Sun, 16 Jun 2013 15:36:49 +0000 (+0200) Subject: Improved rescue mode X-Git-Tag: 2.0.0_Beta_4~34^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b28b2a86418efa511e11b3c778d05c2076bb6465;p=GitHub%2FWoltLab%2FWCF.git Improved rescue mode --- diff --git a/wcfsetup/install/files/acp/templates/index.tpl b/wcfsetup/install/files/acp/templates/index.tpl index 9270892dd0..cb09902e7f 100644 --- a/wcfsetup/install/files/acp/templates/index.tpl +++ b/wcfsetup/install/files/acp/templates/index.tpl @@ -18,6 +18,10 @@

{lang}wcf.global.acp{/lang}

+{if $inRescueMode} +

{lang}wcf.acp.index.inRescueMode{/lang}

+{/if} + {if $usersAwaitingApproval}

{lang}wcf.acp.user.usersAwaitingApprovalInfo{/lang}

{/if} diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index 3be61ed022..b333b9d8ba 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\RequestHandler; use wcf\system\request\RouteHandler; use wcf\system\user\authentication\EmailUserAuthentication; use wcf\system\user\authentication\UserAuthenticationFactory; @@ -140,8 +141,14 @@ class LoginForm extends AbstractForm { HeaderUtil::redirect($this->url); } else { - $application = ApplicationHandler::getInstance()->getActiveApplication(); - $path = $application->getPageURL() . 'acp/' . SID_ARG_1ST; + if (RequestHandler::getInstance()->inRescueMode()) { + $path = RouteHandler::getHost() . RouteHandler::getPath() . SID_ARG_1ST; + } + else { + $application = ApplicationHandler::getInstance()->getActiveApplication(); + $path = $application->getPageURL() . 'acp/' . SID_ARG_1ST; + } + HeaderUtil::redirect($path); } exit; diff --git a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php index ea798f49ae..3a1fae946f 100755 --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@ -7,6 +7,7 @@ use wcf\system\event\EventHandler; use wcf\system\image\adapter\ImagickImageAdapter; use wcf\system\language\LanguageFactory; use wcf\system\package\PackageInstallationDispatcher; +use wcf\system\request\RequestHandler; use wcf\system\WCF; /** @@ -63,10 +64,11 @@ class IndexPage extends AbstractPage { $row = $statement->fetchArray(); $usersAwaitingApproval = $row['count']; } - WCF::getTPL()->assign('usersAwaitingApproval', $usersAwaitingApproval); WCF::getTPL()->assign(array( - 'server' => $this->server + 'inRescueMode' => RequestHandler::getInstance()->inRescueMode(), + 'server' => $this->server, + 'usersAwaitingApproval' => $usersAwaitingApproval )); } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index a1ba00617d..f7ea414ee8 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -325,6 +325,7 @@ + Anwendungen verwalten.]]> @@ -1737,7 +1738,6 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getAllowedExtensions() - diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 35dec274db..c9fb4d927a 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -324,6 +324,7 @@ Examples for medium ID detection: + Manage Applications.]]>