Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-01-08 00:57:13 +0400
committerBernhard Posselt <nukeawhale@gmail.com>2013-01-08 00:57:13 +0400
commit75dbe8866499102b9f97c3584f5b71b50d53b07e (patch)
treecb1ef437791e5cfc599aeea4c19eea08dc4ecebc /lib/router.php
parent5ccbfd907942648a9b50131bb9a43122b8147e0d (diff)
added cleanup recommendations by including ocs in the cachedKey method and moving the ocs routes stuff at the end of the loadRoutes method
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/router.php b/lib/router.php
index 504d2f357c5..746b68c2c0c 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -49,6 +49,7 @@ class OC_Router {
$files = $this->getRoutingFiles();
$files[] = 'settings/routes.php';
$files[] = 'core/routes.php';
+ $files[] = 'ocs/routes.php';
$this->cache_key = OC_Cache::generateCacheKeyFromFiles($files);
}
return $this->cache_key;
@@ -58,11 +59,6 @@ class OC_Router {
* loads the api routes
*/
public function loadRoutes() {
- // include ocs routes
- require_once(OC::$SERVERROOT.'/ocs/routes.php');
- $collection = $this->getCollection('ocs');
- $this->root->addCollection($collection, '/ocs');
-
foreach($this->getRoutingFiles() as $app => $file) {
$this->useCollection($app);
require_once $file;
@@ -73,6 +69,10 @@ class OC_Router {
require_once 'settings/routes.php';
require_once 'core/routes.php';
+ // include ocs routes
+ require_once 'ocs/routes.php';
+ $collection = $this->getCollection('ocs');
+ $this->root->addCollection($collection, '/ocs');
}
protected function getCollection($name) {