From: Alexander Ebert Date: Tue, 10 Feb 2015 13:47:47 +0000 (+0100) Subject: Some small fixes for the routing system X-Git-Tag: 2.1.0_RC_1~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5dd7f1b92ae3983fc31862852c69a569fdd3e8f;p=GitHub%2FWoltLab%2FWCF.git Some small fixes for the routing system --- 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; }