diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-30 16:00:19 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-11-30 16:04:07 +0100 |
commit | f22e02cd79e27b1d994fd84a98eb5a8c60563e72 (patch) | |
tree | ed473f4d77fcbb8b1be958c1e29f5fee72336ecb /core/Command | |
parent | 288f50bdc72011ce4e045322698793a843e09b0a (diff) | |
download | nextcloud-server-f22e02cd79e27b1d994fd84a98eb5a8c60563e72.tar.gz nextcloud-server-f22e02cd79e27b1d994fd84a98eb5a8c60563e72.zip |
Refactor method to check if update is needed
There was only one call, that actually needed the parameter to be set to true. So this change moved the print of the page to that location and replaces all other occurences with a direct call to the underlying OCP API.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Upgrade.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 2a502dbe921..c60e6da0795 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -39,6 +39,7 @@ use OC\Installer; use OC\Updater; use OCP\IConfig; use OCP\ILogger; +use OCP\Util; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; @@ -93,7 +94,7 @@ class Upgrade extends Command { */ protected function execute(InputInterface $input, OutputInterface $output) { - if(\OC::checkUpgrade(false)) { + if(Util::needUpgrade()) { if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { // Prepend each line with a little timestamp $timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter()); |