From: Tim Düsterhus Date: Mon, 27 Jun 2022 15:00:37 +0000 (+0200) Subject: Delegate to ->classNameToControllerName() in RoutingCacheBuilder::getCaseInsensitiveC... X-Git-Tag: 6.0.0_Alpha_1~1140^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5a17e4ce5eafa61bdb98c1c5a1a7356524f164f;p=GitHub%2FWoltLab%2FWCF.git Delegate to ->classNameToControllerName() in RoutingCacheBuilder::getCaseInsensitiveControllers() --- diff --git a/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php index 16619e646b..42a1329428 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php @@ -150,12 +150,12 @@ class RoutingCacheBuilder extends AbstractCacheBuilder // search for files with two consecutive upper-case letters but ignore interfaces such as `IPage` if (!\preg_match('~^I[A-Z][a-z]~', $filename) && \preg_match('~[A-Z]{2,}~', $filename)) { + $className = $abbreviation . '\\' . ($libDirectory === 'lib/acp' ? 'acp\\' : '') . $pageType . '\\' . $filename; + $ciController = ControllerMap::transformController( - \preg_replace('/(Action|Form|Page)$/', '', $filename) + $this->classNameToControllerName($className) ); - $className = $abbreviation . '\\' . ($libDirectory === 'lib/acp' ? 'acp\\' : '') . $pageType . '\\' . $filename; - $data[$abbreviation][$libDirectory === 'lib' ? 'frontend' : 'acp'][$ciController] = $className; } }