From f5dd7f1b92ae3983fc31862852c69a569fdd3e8f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 10 Feb 2015 14:47:47 +0100 Subject: [PATCH] Some small fixes for the routing system --- wcfsetup/install/files/lib/system/WCFACP.class.php | 4 ++-- wcfsetup/install/files/lib/system/request/Route.class.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 718b366391..ad12a238ea 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -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; diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index 32cdfdf30d..dea54b6734 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -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; } -- 2.20.1