[Pkg-owncloud-commits] [owncloud] 88/205: [updater] keep maintenance active on failure and mark failure in red

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:36:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit c86e129ce90c65de92172676b3798a8b48589b58
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Tue Jun 23 14:45:53 2015 +0200

    [updater] keep maintenance active on failure and mark failure in red
---
 core/command/upgrade.php | 3 ++-
 lib/private/updater.php  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 6791d38..6d87f0a 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -130,7 +130,8 @@ class Upgrade extends Command {
 				function ($success) use($output, $updateStepEnabled, $self) {
 					$mode = $updateStepEnabled ? 'Update' : 'Update simulation';
 					$status = $success ? 'successful' : 'failed' ;
-					$message = "<info>$mode $status</info>";
+					$type = $success ? 'info' : 'error';
+					$message = "<$type>$mode $status</$type>";
 					$output->writeln($message);
 				});
 			$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 1b17fac..72998c4 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -200,7 +200,7 @@ class Updater extends BasicEmitter {
 
 		$this->emit('\OC\Updater', 'updateEnd', array($success));
 
-		if(!$wasMaintenanceModeEnabled) {
+		if(!$wasMaintenanceModeEnabled && $success) {
 			$this->config->setSystemValue('maintenance', false);
 			$this->emit('\OC\Updater', 'maintenanceDisabled');
 		} else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list