diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-10 10:37:36 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-10 10:37:36 +0200 |
commit | 0eabd9fff88048895017b4c8409db1350f44de5a (patch) | |
tree | 7a4e953bad54b4659e3f1293571bade7188e77c2 | |
parent | 129983fc12e07166a7fc8f014742817d0fa397e9 (diff) | |
download | nextcloud-server-feat/router-list-routs-cmd.tar.gz nextcloud-server-feat/router-list-routs-cmd.zip |
fix(router): Fix loading legacy routes in the correct collectionfeat/router-list-routs-cmd
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/private/Route/CachingRouter.php | 1 | ||||
-rw-r--r-- | lib/private/Route/Router.php | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php index d88811f729e..314d4c22812 100644 --- a/lib/private/Route/CachingRouter.php +++ b/lib/private/Route/CachingRouter.php @@ -117,7 +117,6 @@ class CachingRouter extends Router { * Closures cannot be serialized to cache, so for legacy routes calling an action we have to include the routes.php file again */ $app = $parameters['app']; - $this->useCollection($app); parent::requireRouteFile($parameters['route-file'], $app); $collection = $this->getCollection($app); $parameters['action'] = $collection->get($parameters['_route'])?->getDefault('action'); diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index c26346bf998..1f6cb438cb2 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -482,6 +482,7 @@ class Router implements IRouter { */ protected function requireRouteFile(string $file, string $appName): void { try { + $this->useCollection($appName); $this->setupRoutes(include $file, $appName); } catch (\TypeError) { $this->logger->debug('Routes should only be registered by returning an array of routes from the routes.php'); |