Merge pull request #6219 from leo-b/fix_router_deprecation

Symfonys addCollection() with multiple arguments is deprecated

* leo-b/fix_router_deprecation:
  Symfonys addCollection() with multiple arguments is deprecated, fix deprecation warning
This commit is contained in:
Andreas Fischer 2013-12-19 17:38:37 +01:00
commit 526e873073
1 changed files with 4 additions and 2 deletions

View File

@ -67,7 +67,8 @@ class OC_Router {
$this->useCollection($app); $this->useCollection($app);
require_once $file; require_once $file;
$collection = $this->getCollection($app); $collection = $this->getCollection($app);
$this->root->addCollection($collection, '/apps/'.$app); $collection->addPrefix('/apps/'.$app);
$this->root->addCollection($collection);
} }
$this->useCollection('root'); $this->useCollection('root');
require_once 'settings/routes.php'; require_once 'settings/routes.php';
@ -76,7 +77,8 @@ class OC_Router {
// include ocs routes // include ocs routes
require_once 'ocs/routes.php'; require_once 'ocs/routes.php';
$collection = $this->getCollection('ocs'); $collection = $this->getCollection('ocs');
$this->root->addCollection($collection, '/ocs'); $collection->addPrefix('/ocs');
$this->root->addCollection($collection);
} }
protected function getCollection($name) { protected function getCollection($name) {