Improved rescue mode
authorAlexander Ebert <ebert@woltlab.com>
Sun, 16 Jun 2013 15:36:49 +0000 (17:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 16 Jun 2013 15:36:49 +0000 (17:36 +0200)
wcfsetup/install/files/acp/templates/index.tpl
wcfsetup/install/files/lib/acp/form/LoginForm.class.php
wcfsetup/install/files/lib/acp/page/IndexPage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 9270892dd0c466fbc4a7e6c92cdae22816f4aad8..cb09902e7f2c4c162c786b8bb5a919efa5806436 100644 (file)
        <h1>{lang}wcf.global.acp{/lang}</h1>
 </header>
 
+{if $inRescueMode}
+       <p style="background-color: rgb(255, 153, 153); border: 2px solid rgb(255, 0, 0); padding: 1em;">{lang}wcf.acp.index.inRescueMode{/lang}</p>
+{/if}
+
 {if $usersAwaitingApproval}
        <p class="info">{lang}wcf.acp.user.usersAwaitingApprovalInfo{/lang}</p>
 {/if}
index 3be61ed022315b6841f31ebcfc38123bea5e44f8..b333b9d8ba5231147184481e0c1255fe7f2af746 100755 (executable)
@@ -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;
index ea798f49ae4ab75739c0f136d1ff5901d80108eb..3a1fae946fe9bf8db27cba7a2b4ab8328c9ce42e 100755 (executable)
@@ -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
                ));
        }
        
index a1ba00617d73f28179647f1743c21c1ba005c7b7..f7ea414ee8706745790955eb1c4e320a7f4c346f 100644 (file)
                <item name="wcf.acp.index.credits.productManager"><![CDATA[Projektleitung]]></item>
                <item name="wcf.acp.index.credits.trademarks"><![CDATA[„WoltLab&reg;“ und „Burning Board&reg;“ sind eingetragene Gemeinschaftsmarken beim europäischen Harmonisierungsamt für den Binnenmarkt (OHIM) in Alicante, Spanien.]]></item>
                <item name="wcf.acp.index.credits.contributor.more"><![CDATA[Weitere]]></item>
+               <item name="wcf.acp.index.inRescueMode"><![CDATA[Sie rufen diese Installation über eine abweichende Domain auf, etwa auf Grund eines Umzuges. Bitte korrigieren Sie die Einstellungen unter <a href="{link controller='ApplicationManagement'}{/link}">Anwendungen verwalten</a>.]]></item>
                <item name="wcf.acp.index.news"><![CDATA[Nachrichten]]></item>
                <item name="wcf.acp.index.system"><![CDATA[System]]></item>
                <item name="wcf.acp.index.system.software"><![CDATA[Software]]></item>
@@ -1737,7 +1738,6 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getAllowedExtensions()
                <item name="wcf.page.mainMenu"><![CDATA[Navigation]]></item>
                <item name="wcf.page.pagePosition"><![CDATA[Seite {#$pageNo} von {#$pages}]]></item>
                <item name="wcf.page.sitemap.userAccount"><![CDATA[Benutzerkonto]]></item>
-               <item name="wcf.page.javascriptDisabled"><![CDATA[In Ihrem Webbrowser ist Javascript deaktiviert. Um alle Funktionen dieser Webseite nutzen zu können, muss Javascript aktiviert sein.]]></item>
        </category>
        
        <category name="wcf.poll">
index 35dec274db866d1e3b8cc4e47caca9750836cec1..c9fb4d927ad13e85b8bf6ff60e45e13b024eae67 100644 (file)
@@ -324,6 +324,7 @@ Examples for medium ID detection:
                <item name="wcf.acp.index.credits.productManager"><![CDATA[Product Manager]]></item>
                <item name="wcf.acp.index.credits.trademarks"><![CDATA[“WoltLab&reg;” and “Burning Board&reg;” are registered Community Trade Marks at The Office of Harmonization for the Internal Market (OHIM) in Alicante, Spain.]]></item>
                <item name="wcf.acp.index.credits.contributor.more"><![CDATA[More]]></item>
+               <item name="wcf.acp.index.inRescueMode"><![CDATA[You are accessing this installation from an unknown domain, possibly caused by moving to a new host. Please update the settings on <a href="{link controller='ApplicationManagement'}{/link}">Manage Applications</a>.]]></item>
                <item name="wcf.acp.index.news"><![CDATA[News]]></item>
                <item name="wcf.acp.index.system"><![CDATA[System]]></item>
                <item name="wcf.acp.index.system.software"><![CDATA[Software]]></item>