]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only load core routes for ocs and settings
authorRobin Appelman <icewind@owncloud.com>
Tue, 25 Mar 2014 12:42:47 +0000 (13:42 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 25 Mar 2014 12:42:47 +0000 (13:42 +0100)
lib/private/route/router.php

index a0e701d391a5c6f1e64f5c69d91395ae46428d91..8b2c9e72f2005b83b882e75789d2b48a9b035c12 100644 (file)
@@ -178,9 +178,10 @@ class Router implements IRouter {
         */
        public function match($url) {
                if (substr($url, 0, 6) === '/apps/') {
+                       // empty string / 'apps' / $app / rest of the route
                        list(, , $app,) = explode('/', $url, 4);
                        $this->loadRoutes($app);
-               } else if(substr($url, 0, 6) === '/core/') {
+               } else if(substr($url, 0, 6) === '/core/' or substr($url, 0, 5) === '/ocs/' or substr($url, 0, 10) === '/settings/') {
                        $this->loadRoutes('core');
                } else {
                        $this->loadRoutes();