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.
This commit is contained in:
Robin McCorkell 2015-09-01 15:42:41 +01:00
parent 87b3e28f06
commit 5b2529b448
1 changed files with 3 additions and 2 deletions

View File

@ -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');