From a2d6b27170a60efeebd57a82365c0f99f49e0ada Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 3 Mar 2013 23:03:47 +0100 Subject: [PATCH 1/2] 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) { From d800f35bf460c3bb94aef90ea2479e408eb0bae8 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 3 Mar 2013 23:08:41 +0100 Subject: [PATCH 2/2] Disable loading of backgroundjobs js when upgrade is needed --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 98a72cb901..bffae36261 100644 --- a/lib/base.php +++ b/lib/base.php @@ -539,7 +539,7 @@ class OC { 'setting locale to en_US.UTF-8/en_US.UTF8 failed. Support is probably not installed on your system', OC_Log::ERROR); } - if (OC_Config::getValue('installed', false)) { + if (OC_Config::getValue('installed', false) && !self::checkUpgrade(false)) { if (OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') { OC_Util::addScript('backgroundjobs'); }