diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-06-23 14:45:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-06-23 14:45:53 +0200 |
commit | c86e129ce90c65de92172676b3798a8b48589b58 (patch) | |
tree | 3b96089aafb02a057e1862f36ab865d4b7e069dc | |
parent | fe42553e8a034ca246698144b03dc4570fe0b826 (diff) | |
download | nextcloud-server-c86e129ce90c65de92172676b3798a8b48589b58.tar.gz nextcloud-server-c86e129ce90c65de92172676b3798a8b48589b58.zip |
[updater] keep maintenance active on failure and mark failure in red
-rw-r--r-- | core/command/upgrade.php | 3 | ||||
-rw-r--r-- | 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 6791d386b27..6d87f0a9891 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 1b17face2e0..72998c4b3d2 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 { |