From a2d6b27170a60efeebd57a82365c0f99f49e0ada Mon Sep 17 00:00:00 2001
From: Bart Visscher <bartv@thisnet.nl>
Date: Sun, 3 Mar 2013 23:03:47 +0100
Subject: [PATCH] Check maintenance mode before loading apps in route matcher

---
 lib/base.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/base.php b/lib/base.php
index f70496912d..98a72cb901 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -596,7 +596,9 @@ class OC {
 
 		if (!self::$CLI) {
 			try {
-				OC_App::loadApps();
+				if (!OC_Config::getValue('maintenance', false)) {
+					OC_App::loadApps();
+				}
 				OC::getRouter()->match(OC_Request::getRawPathInfo());
 				return;
 			} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
-- 
GitLab