summaryrefslogtreecommitdiffstats
path: root/core/command
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-03-31 15:33:01 +0200
committerAndreas Fischer <bantu@owncloud.com>2014-03-31 15:33:01 +0200
commit2d69c4c2d351ec31023c26511151f84a9adb640f (patch)
tree6b1b573c70814e3fe9c89d8db542781bb7574570 /core/command
parenta55c56c9e7c0c78c1592f2501b527b5c977cafb7 (diff)
parent65e3f634000a2142f412b85d0443f241bb64a9ab (diff)
downloadnextcloud-server-2d69c4c2d351ec31023c26511151f84a9adb640f.tar.gz
nextcloud-server-2d69c4c2d351ec31023c26511151f84a9adb640f.zip
Merge remote-tracking branch 'owncloud/master' into db-convert-tool
* owncloud/master: (663 commits) [tx-robot] updated from transifex [tx-robot] updated from transifex Sub-dir was prepended twice Sub-dir was prepended twice [tx-robot] updated from transifex Use UrlGenerator in OC\Util::redirectToDefaultPage(). Fix #7936 Emit event after setting a new expiration for a share adding @method annotation to declare methods which can be called on the wrapped statement object Fix CURLOPT_FOLLOWLOCATION bug with open_basedir or safe_mode restriction enabled. don't write file if opening a stream to encrypt the data fails Do not retrieve storage stats for trash bin [tx-robot] updated from transifex prevent dimmed ocdialog div from scrolling fix breadcrumbs for IE8 enable SVG->PNG fallback for 'New' menu enable SVG->PNG fallback for newly uploaded files and folders specify logo to not repeat when container is bigger fix SVG replacement for logo so it works in IE8, fix #7866 Fix swift touch operation [tx-robot] updated from transifex ... Conflicts: 3rdparty
Diffstat (limited to 'core/command')
-rw-r--r--core/command/db/generatechangescript.php1
-rw-r--r--core/command/status.php2
-rw-r--r--core/command/upgrade.php40
-rw-r--r--core/command/user/report.php5
4 files changed, 27 insertions, 21 deletions
diff --git a/core/command/db/generatechangescript.php b/core/command/db/generatechangescript.php
index f971124cfdc..a4d710aa974 100644
--- a/core/command/db/generatechangescript.php
+++ b/core/command/db/generatechangescript.php
@@ -11,7 +11,6 @@ namespace OC\Core\Command\Db;
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 GenerateChangeScript extends Command {
diff --git a/core/command/status.php b/core/command/status.php
index ea9825b0f61..6bc1dba44aa 100644
--- a/core/command/status.php
+++ b/core/command/status.php
@@ -9,9 +9,7 @@
namespace OC\Core\Command;
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 Status extends Command {
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 1d105b67a06..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,10 +27,13 @@ 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;
-
- $RUNTIME_NOAPPS = true; //no apps, yet
require_once \OC::$SERVERROOT . '/lib/base.php';
@@ -55,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);
@@ -71,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
@@ -86,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>'
+ );
+ }
+ }
}
diff --git a/core/command/user/report.php b/core/command/user/report.php
index f95ba251bcc..a5159310af1 100644
--- a/core/command/user/report.php
+++ b/core/command/user/report.php
@@ -9,10 +9,8 @@
namespace OC\Core\Command\User;
use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Helper\TableHelper;
class Report extends Command {
protected function configure() {
@@ -48,7 +46,6 @@ class Report extends Command {
}
private function countUsers() {
- \OC_App::loadApps(array('authentication'));
$userManager = \OC::$server->getUserManager();
return $userManager->countUsers();
}
@@ -58,4 +55,4 @@ class Report extends Command {
$userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory');
return count($userDirectories);
}
-} \ No newline at end of file
+}