Fixed redirect to login
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 13:41:21 +0000 (14:41 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 13:41:21 +0000 (14:41 +0100)
Fixes #528

wcfsetup/install/files/lib/system/WCFACP.class.php

index 9e9095e13b025b2139c80a8c34900ccd36295b32..f2f72d9939faf2372116d225cd8ce5c014a2a10e 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system;
+use wcf\system\application\ApplicationHandler;
 use wcf\system\cache\CacheHandler;
 use wcf\system\request\RouteHandler;
 use wcf\system\session\ACPSessionFactory;
@@ -56,7 +57,11 @@ class WCFACP extends WCF {
                $pathInfo = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : '';
                if (empty($pathInfo) || !preg_match('~^/(ACPCaptcha|Login)/~', $pathInfo)) {
                        if (WCF::getUser()->userID == 0) {
-                               util\HeaderUtil::redirect('index.php/Login/'.SID_ARG_1ST, false);
+                               // build redirect path
+                               $application = ApplicationHandler::getInstance()->getActiveApplication();
+                               $path = $application->domainName . $application->domainPath . 'acp/index.php/Login/' . SID_ARG_1ST;
+                               
+                               util\HeaderUtil::redirect($path, false);
                                exit;
                        }
                        else {