diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-21 14:05:08 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-21 14:05:08 +0100 |
commit | 6ff96b34ad0462ad05c34633ccd08236b93bf195 (patch) | |
tree | 1acd7eb869d512b5a3fc9502961a98591ea20cfa /core/command/upgrade.php | |
parent | e139f7c863d5971a6386070148496cb0f70ad04e (diff) | |
parent | 37af74efb3e3511b2d6eacef67dc90f22a685bd3 (diff) | |
download | nextcloud-server-6ff96b34ad0462ad05c34633ccd08236b93bf195.tar.gz nextcloud-server-6ff96b34ad0462ad05c34633ccd08236b93bf195.zip |
Merge branch 'master' into load-apps-proper-master
Conflicts:
apps/files/ajax/rawlist.php
cron.php
ocs/v1.php
Diffstat (limited to 'core/command/upgrade.php')
-rw-r--r-- | core/command/upgrade.php | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/core/command/upgrade.php b/core/command/upgrade.php index 2eded15e9fe..ed72d136e24 100644 --- a/core/command/upgrade.php +++ b/core/command/upgrade.php @@ -10,9 +10,7 @@ namespace OC\Core\Command; use OC\Updater; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class Upgrade extends Command { @@ -29,6 +27,12 @@ class Upgrade extends Command { ; } + /** + * Execute the upgrade command + * + * @param InputInterface $input input interface + * @param OutputInterface $output output interface + */ protected function execute(InputInterface $input, OutputInterface $output) { require_once \OC::$SERVERROOT . '/lib/base.php'; @@ -52,15 +56,6 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { $output->writeln('<info>Updated database</info>'); }); - $updater->listen('\OC\Updater', 'filecacheStart', function () use($output) { - $output->writeln('<info>Updating filecache, this may take really long...</info>'); - }); - $updater->listen('\OC\Updater', 'filecacheDone', function () use($output) { - $output->writeln('<info>Updated filecache</info>'); - }); - $updater->listen('\OC\Updater', 'filecacheProgress', function ($out) use($output) { - $output->writeln('... ' . $out . '% done ...'); - }); $updater->listen('\OC\Updater', 'failure', function ($message) use($output) { $output->writeln($message); @@ -68,6 +63,9 @@ class Upgrade extends Command { }); $updater->upgrade(); + + $this->postUpgradeCheck($input, $output); + return self::ERROR_SUCCESS; } else if(\OC_Config::getValue('maintenance', false)) { //Possible scenario: ownCloud core is updated but an app failed @@ -83,4 +81,21 @@ class Upgrade extends Command { return self::ERROR_UP_TO_DATE; } } + + /** + * Perform a post upgrade check (specific to the command line tool) + * + * @param InputInterface $input input interface + * @param OutputInterface $output output interface + */ + protected function postUpgradeCheck(InputInterface $input, OutputInterface $output) { + $trustedDomains = \OC_Config::getValue('trusted_domains', array()); + if (empty($trustedDomains)) { + $output->write( + '<warning>The setting "trusted_domains" could not be ' . + 'set automatically by the upgrade script, ' . + 'please set it manually</warning>' + ); + } + } } |