summaryrefslogtreecommitdiffstats
path: root/core/command/upgrade.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-10-28 22:19:15 +0100
committerAndreas Fischer <bantu@owncloud.com>2013-10-28 22:22:59 +0100
commitb8dbec0da464069cea065eb413b0c3fb0e3971d1 (patch)
tree3537ea3f8403201292536de17a9e0180c8171ee5 /core/command/upgrade.php
parentf130caa4a2158b516cf0f0bc383d3f83f91dfc07 (diff)
downloadnextcloud-server-b8dbec0da464069cea065eb413b0c3fb0e3971d1.tar.gz
nextcloud-server-b8dbec0da464069cea065eb413b0c3fb0e3971d1.zip
Use "else if" to remove one level of indentation.
Diffstat (limited to 'core/command/upgrade.php')
-rw-r--r--core/command/upgrade.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 7f03769a609..03976e59bd8 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -72,20 +72,18 @@ class Upgrade extends Command {
$updater->upgrade();
return self::ERROR_SUCCESS;
+ } else if(\OC_Config::getValue('maintenance', false)) {
+ //Possible scenario: ownCloud core is updated but an app failed
+ $output->writeln('ownCloud is in maintenance mode');
+ $output->write('Maybe an upgrade is already in process. Please check the '
+ . 'logfile (data/owncloud.log). If you want to re-run the '
+ . 'upgrade procedure, remove the "maintenance mode" from '
+ . 'config.php and call this script again.'
+ , true);
+ return self::ERROR_MAINTENANCE_MODE;
} else {
- if(\OC_Config::getValue('maintenance', false)) {
- //Possible scenario: ownCloud core is updated but an app failed
- $output->writeln('ownCloud is in maintenance mode');
- $output->write('Maybe an upgrade is already in process. Please check the '
- . 'logfile (data/owncloud.log). If you want to re-run the '
- . 'upgrade procedure, remove the "maintenance mode" from '
- . 'config.php and call this script again.'
- , true);
- return self::ERROR_MAINTENANCE_MODE;
- } else {
- $output->writeln('ownCloud is already latest version');
- return self::ERROR_UP_TO_DATE;
- }
+ $output->writeln('ownCloud is already latest version');
+ return self::ERROR_UP_TO_DATE;
}
}
}