Delegate to ->classNameToControllerName() in RoutingCacheBuilder::getCaseInsensitiveC...
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jun 2022 15:00:37 +0000 (17:00 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jun 2022 15:00:37 +0000 (17:00 +0200)
wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php

index 16619e646b7674f6d55bc882665153ff3a821654..42a1329428a2182f2915095869e05188e3f21610 100644 (file)
@@ -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;
                         }
                     }