]> source.dussan.org Git - nextcloud-server.git/commitdiff
added cleanup recommendations by including ocs in the cachedKey method and moving...
authorBernhard Posselt <nukeawhale@gmail.com>
Mon, 7 Jan 2013 20:57:13 +0000 (21:57 +0100)
committerBernhard Posselt <nukeawhale@gmail.com>
Mon, 7 Jan 2013 20:57:13 +0000 (21:57 +0100)
lib/router.php

index 504d2f357c5f5ecbb73d748b98fd9851cbd91335..746b68c2c0c4a8078f0c738d5b991d9808814f0f 100644 (file)
@@ -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) {