summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-03-17 13:21:54 +0100
committericewind1991 <robin@icewind.nl>2014-03-17 13:21:54 +0100
commit4112d63a4082b8e79c42f8295dfaa4e10ecf0f8c (patch)
treeb628106c95f943a518f928e59ae1558f2a51d9a3 /core
parentbd98538a3646e4f7a56a16e93889e4d3079501d6 (diff)
parent1a116828cf00b434c5d3f5a3948393a714899df9 (diff)
downloadnextcloud-server-4112d63a4082b8e79c42f8295dfaa4e10ecf0f8c.tar.gz
nextcloud-server-4112d63a4082b8e79c42f8295dfaa4e10ecf0f8c.zip
Merge pull request #7727 from owncloud/cli-trusteddomainupgradewarning
Added warning for trusted_domains after CLI upgrade
Diffstat (limited to 'core')
-rw-r--r--core/command/upgrade.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 128d27aa3db..6e5681b26df 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -27,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) {
global $RUNTIME_NOAPPS;
@@ -69,6 +75,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
@@ -84,4 +93,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>'
+ );
+ }
+ }
}