From c17f415356ef9a8145de6403cb40af203d6c574e Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Tue, 25 Mar 2014 13:42:47 +0100
Subject: [PATCH] Only load core routes for ocs and settings

---
 lib/private/route/router.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index a0e701d391..8b2c9e72f2 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -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();
-- 
GitLab