summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 14:39:11 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 14:39:11 +0200
commitcc4efc4c03f4d4f7ec9e6cf9beac570254bef3c1 (patch)
treea2f37241fbfbc0f8271f3a7087237454bd5a415b /core
parentc26145aab33481dd958277d2b562703a9c2fd90b (diff)
parent3aa77960ef78e397ae3e42d82aae32cac3114752 (diff)
downloadnextcloud-server-cc4efc4c03f4d4f7ec9e6cf9beac570254bef3c1.tar.gz
nextcloud-server-cc4efc4c03f4d4f7ec9e6cf9beac570254bef3c1.zip
Merge pull request #24085 from owncloud/feedback-on-app-migrations
App migration steps need to push feedback to the user ....
Diffstat (limited to 'core')
-rw-r--r--core/Command/Maintenance/Repair.php28
-rw-r--r--core/register_command.php2
2 files changed, 23 insertions, 7 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php
index 95e2b872227..2da76143390 100644
--- a/core/Command/Maintenance/Repair.php
+++ b/core/Command/Maintenance/Repair.php
@@ -24,15 +24,14 @@
namespace OC\Core\Command\Maintenance;
+use Exception;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class Repair extends Command {
- /**
- * @var \OC\Repair $repair
- */
+ /** @var \OC\Repair $repair */
protected $repair;
/** @var \OCP\IConfig */
protected $config;
@@ -55,9 +54,7 @@ class Repair extends Command {
'include-expensive',
null,
InputOption::VALUE_NONE,
- 'Use this option when you want to include resource and load expensive tasks'
- )
- ;
+ 'Use this option when you want to include resource and load expensive tasks');
}
protected function execute(InputInterface $input, OutputInterface $output) {
@@ -68,6 +65,25 @@ class Repair extends Command {
}
}
+ $apps = \OC::$server->getAppManager()->getInstalledApps();
+ foreach ($apps as $app) {
+ if (!\OC_App::isEnabled($app)) {
+ continue;
+ }
+ $info = \OC_App::getAppInfo($app);
+ if (!is_array($info)) {
+ continue;
+ }
+ $steps = $info['repair-steps']['post-migration'];
+ foreach ($steps as $step) {
+ try {
+ $this->repair->addStep($step);
+ } catch (Exception $ex) {
+ $output->writeln("<error>Failed to load repair step for $app: {$ex->getMessage()}</error>");
+ }
+ }
+ }
+
$maintenanceMode = $this->config->getSystemValue('maintenance', false);
$this->config->setSystemValue('maintenance', true);
diff --git a/core/register_command.php b/core/register_command.php
index 90a54233e66..0b1a019f993 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -32,7 +32,7 @@
/** @var $application Symfony\Component\Console\Application */
$application->add(new OC\Core\Command\Status);
$application->add(new OC\Core\Command\Check(\OC::$server->getConfig()));
-$infoParser = new \OC\App\InfoParser(\OC::$server->getHTTPHelper(), \OC::$server->getURLGenerator());
+$infoParser = new \OC\App\InfoParser(\OC::$server->getURLGenerator());
$application->add(new OC\Core\Command\App\CheckCode($infoParser));
$application->add(new OC\Core\Command\L10n\CreateJs());
$application->add(new \OC\Core\Command\Integrity\SignApp(