Fix the test for the correct set-up of index.php-less URLs
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 25 Aug 2023 08:02:27 +0000 (10:02 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 25 Aug 2023 08:02:27 +0000 (10:02 +0200)
This likely regressed in 4da8c1de463ca71f09d284f3529c1d499a7ac8f8.

see https://www.woltlab.com/community/thread/301353-seltsamer-verhalten-link-umschreibungen-aktivieren/

wcfsetup/install/files/lib/system/request/ControllerMap.class.php

index 0b6263524f8cba87e0fa52d9428fd0dd8f033b94..5e97d4a9959f1fb93b1e68277d6f14d6d545dd86 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace wcf\system\request;
 
+use wcf\action\CoreRewriteTestAction;
 use wcf\page\CmsPage;
 use wcf\system\cache\builder\RoutingCacheBuilder;
 use wcf\system\exception\SystemException;
@@ -91,6 +92,15 @@ final class ControllerMap extends SingletonFactory
             if ($classData === null) {
                 $classData = $this->getClassData($application, $controller, $isAcpRequest, 'action');
             }
+            if ($classData === null) {
+                // The CoreRewriteTest controller is special and needs to be available in all apps.
+                if ($controller === 'CoreRewriteTest') {
+                    $classData = [
+                        'controller' => 'CoreRewriteTest',
+                        'className' => CoreRewriteTestAction::class,
+                    ];
+                }
+            }
         }
 
         if ($classData === null) {