Some small fixes for the routing system
authorAlexander Ebert <ebert@woltlab.com>
Tue, 10 Feb 2015 13:47:47 +0000 (14:47 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 10 Feb 2015 13:47:47 +0000 (14:47 +0100)
wcfsetup/install/files/lib/system/WCFACP.class.php
wcfsetup/install/files/lib/system/request/Route.class.php

index 718b3663914ec2fe80a3198dfdd6b94f8b29aa15..ad12a238ea472e5ed911f8fcae92fd8f94572482 100644 (file)
@@ -64,7 +64,7 @@ class WCFACP extends WCF {
                // this is a work-around since neither RequestHandler
                // nor RouteHandler are populated right now
                $pathInfo = RouteHandler::getPathInfo();
-               if (empty($pathInfo) || !preg_match('~^/?(ACPCaptcha|Login|Logout)/~i', $pathInfo)) {
+               if (empty($pathInfo) || !preg_match('~^/?(acp-?captcha|login|logout)/~i', $pathInfo)) {
                        if (WCF::getUser()->userID == 0) {
                                // work-around for AJAX-requests within ACP
                                if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
@@ -88,7 +88,7 @@ class WCFACP extends WCF {
                                // drop session id
                                $redirectURI = preg_replace('~[&\?]s=[a-f0-9]{40}(&|$)~', '', WCF::getSession()->requestURI);
                                
-                               $path = $pageURL . 'acp/?Login/' . SID_ARG_2ND_NOT_ENCODED . '&url=' . rawurlencode(RouteHandler::getProtocol() . $_SERVER['HTTP_HOST'] . $redirectURI);
+                               $path = $pageURL . 'acp/index.php?login/' . SID_ARG_2ND_NOT_ENCODED . '&url=' . rawurlencode(RouteHandler::getProtocol() . $_SERVER['HTTP_HOST'] . $redirectURI);
                                
                                HeaderUtil::redirect($path);
                                exit;
index 32cdfdf30d0c2589352a8e41b3d31efcf2e22ed8..dea54b67341d0bf7ac295ff843448331973ff84f 100644 (file)
@@ -362,7 +362,6 @@ class Route implements IRoute {
                                
                                $controller = explode('\\', $controller);
                                $controllerName = preg_replace('~(Action|Form|Page)$~', '', array_pop($controller));
-                               if (URL_TO_LOWERCASE) $controllerName = mb_strtolower($controllerName);
                                
                                self::$defaultControllers[$controller[0]] = $controllerName;
                        }