From 5b2529b44803b80cc9eab9f356623650d5e5986f Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Tue, 1 Sep 2015 15:42:41 +0100 Subject: [PATCH] Delay adding OCS prefix to route collection until all is loaded ->addPrefix() iterates over all registered routes, so must be run after all apps have had a chance to load their OCS routes. --- lib/private/route/router.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/route/router.php b/lib/private/route/router.php index 33669452f2..7b7849a6da 100644 --- a/lib/private/route/router.php +++ b/lib/private/route/router.php @@ -169,8 +169,9 @@ class Router implements IRouter { $this->useCollection('root'); require_once 'settings/routes.php'; require_once 'core/routes.php'; - - // include ocs routes + } + if ($this->loaded) { + // include ocs routes, must be loaded last for /ocs prefix require_once 'ocs/routes.php'; $collection = $this->getCollection('ocs'); $collection->addPrefix('/ocs');