Inline DynamicRequestRoute::getControllerName()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jun 2022 12:15:50 +0000 (14:15 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 23 Jun 2022 13:31:13 +0000 (15:31 +0200)
wcfsetup/install/files/lib/system/request/route/DynamicRequestRoute.class.php

index 0f10a3732d1644fd6cf4367a087319a3f9e5aae7..0220c58ef734dedd764496da2d70aea2cc9ac271 100644 (file)
@@ -208,7 +208,11 @@ class DynamicRequestRoute implements IRequestRoute
 
                     // handle controller names
                     if ($value === 'controller') {
-                        $components[$value] = $this->getControllerName($application, $components[$value]);
+                        $components[$value] = ControllerMap::getInstance()->lookup(
+                            $application,
+                            $components[$value],
+                            !$this->isACP()
+                        );
                     }
 
                     $link .= $components[$value];
@@ -299,16 +303,4 @@ class DynamicRequestRoute implements IRequestRoute
 
         return false;
     }
-
-    /**
-     * Returns the transformed controller name.
-     *
-     * @param string $application
-     * @param string $controller
-     * @return  string
-     */
-    protected function getControllerName($application, $controller)
-    {
-        return ControllerMap::getInstance()->lookup($application, $controller, !$this->isACP());
-    }
 }