aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-18 09:18:36 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-18 09:18:36 +0100
commit1c2675568667aeccf9855e70970bb1b09ccab13e (patch)
tree0140ed6efc82316c4f955f6b0b7b7e44893babe3 /lib/private/route
parent03965053c34bc0fe673ea0da82ac83ff68ce3fa3 (diff)
downloadnextcloud-server-1c2675568667aeccf9855e70970bb1b09ccab13e.tar.gz
nextcloud-server-1c2675568667aeccf9855e70970bb1b09ccab13e.zip
Only load app routes if the app has already been loaded
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/router.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 48992366092..33669452f2d 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -150,6 +150,12 @@ class Router implements IRouter {
\OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes');
foreach ($routingFiles as $app => $file) {
if (!isset($this->loadedApps[$app])) {
+ if (!\OC_App::isAppLoaded($app)) {
+ // app MUST be loaded before app routes
+ // try again next time loadRoutes() is called
+ $this->loaded = false;
+ continue;
+ }
$this->loadedApps[$app] = true;
$this->useCollection($app);
$this->requireRouteFile($file, $app);