diff --git a/core/command/upgrade.php b/core/command/upgrade.php index 14478f88b052b72cf92d2f4fd8e6cf2ad0d7b47f..44e0b66c17cb72d7ccac3f06f138a7bbf38996f2 100644 --- a/core/command/upgrade.php +++ b/core/command/upgrade.php @@ -178,6 +178,15 @@ class Upgrade extends Command { $output->writeln("<error>$message</error>"); }); + if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { + $updater->listen('\OC\Updater', 'repairInfo', function ($message) use($output) { + $output->writeln('<info>Repair info: ' . $message . '</info>'); + }); + $updater->listen('\OC\Updater', 'repairStep', function ($message) use($output) { + $output->writeln('<info>Repair step: ' . $message . '</info>'); + }); + } + $success = $updater->upgrade(); $this->postUpgradeCheck($input, $output); diff --git a/lib/private/updater.php b/lib/private/updater.php index fa9c1a5176a1f842857587e2f7c54fd0845cf63c..cba8743416508ee1ce9e4657bc51f101b37375c4 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -239,6 +239,12 @@ class Updater extends BasicEmitter { $repair->listen('\OC\Repair', 'error', function ($description) { $this->emit('\OC\Updater', 'repairError', array($description)); }); + $repair->listen('\OC\Repair', 'info', function ($description) { + $this->emit('\OC\Updater', 'repairInfo', array($description)); + }); + $repair->listen('\OC\Repair', 'step', function ($description) { + $this->emit('\OC\Updater', 'repairStep', array($description)); + }); } /** diff --git a/lib/repair/collation.php b/lib/repair/collation.php index e28ee3ab114a9a0718fdbd5489ac662d74256fd2..7eb14f0ded257276d7a3777dc59701eae8b554ee 100644 --- a/lib/repair/collation.php +++ b/lib/repair/collation.php @@ -60,6 +60,7 @@ class Collation extends BasicEmitter implements \OC\RepairStep { $tables = $this->getAllNonUTF8BinTables($this->connection); foreach ($tables as $table) { + $this->emit('\OC\Repair', 'info', array("Change collation for $table ...")); $query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;'); $query->execute(); }