From 5300d6ad552585a316107cb483bd68533116d392 Mon Sep 17 00:00:00 2001
From: Michael Gapczynski <mtgap@owncloud.com>
Date: Tue, 5 Mar 2013 21:13:07 -0500
Subject: [PATCH] Clear the CSS and JS cache earlier to make sure update goes
 smoothly

---
 core/ajax/update.php | 4 ----
 lib/base.php         | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/ajax/update.php b/core/ajax/update.php
index b112cf6266..8b20150d43 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -17,10 +17,6 @@ if (OC::checkUpgrade(false)) {
 	} catch (Exception $exception) {
 		$watcher->failure($exception->getMessage());
 	}
-	$minimizerCSS = new OC_Minimizer_CSS();
-	$minimizerCSS->clearCache();
-	$minimizerJS = new OC_Minimizer_JS();
-	$minimizerJS->clearCache();
 	OC_Config::setValue('version', implode('.', OC_Util::getVersion()));
 	OC_App::checkAppsRequirements();
 	// load all apps to also upgrade enabled apps
diff --git a/lib/base.php b/lib/base.php
index bffae36261..59b861ffce 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -277,6 +277,10 @@ class OC {
 					OC_Log::write('core',
 						'starting upgrade from ' . $installedVersion . ' to ' . $currentVersion,
 						OC_Log::DEBUG);
+					$minimizerCSS = new OC_Minimizer_CSS();
+					$minimizerCSS->clearCache();
+					$minimizerJS = new OC_Minimizer_JS();
+					$minimizerJS->clearCache();
 					OC_Util::addscript('update');
 					$tmpl = new OC_Template('', 'update', 'guest');
 					$tmpl->assign('version', OC_Util::getVersionString());
-- 
GitLab