summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-08-22 15:29:54 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-08-25 16:13:46 +0200
commit4ba30d40cfc892bee0ea28486e63c479e1aadd20 (patch)
tree0be3680618181f1a9fc760f0f481ce6424dc045e /core
parent5509063caac2964bea8e33d272238f266ca6749b (diff)
downloadnextcloud-server-4ba30d40cfc892bee0ea28486e63c479e1aadd20.tar.gz
nextcloud-server-4ba30d40cfc892bee0ea28486e63c479e1aadd20.zip
Switch to string keys for argument of GenericEvent for OC\DB\Migrator
It seems checkTable is actually never dispatched? Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core')
-rw-r--r--core/Command/Upgrade.php8
-rw-r--r--core/ajax/update.php4
2 files changed, 6 insertions, 6 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index acf0b503d19..69a7f1f656f 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -105,12 +105,12 @@ class Upgrade extends Command {
$message = substr($message, 0, 57) . '...';
}
$progress->setMessage($message);
- if ($event[0] === 1) {
+ if ($event['step'] === 1) {
$output->writeln('');
- $progress->start($event[1]);
+ $progress->start($event['max']);
}
- $progress->setProgress($event[0]);
- if ($event[0] === $event[1]) {
+ $progress->setProgress($event['step']);
+ if ($event['step'] === $event['max']) {
$progress->setMessage('Done');
$progress->finish();
$output->writeln('');
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 39a99323cf5..a8352cb40be 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -128,12 +128,12 @@ if (\OCP\Util::needUpgrade()) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
- $eventSource->send('success', $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
+ $eventSource->send('success', $l->t('[%d / %d]: %s', [$event['step'], $event['max'], $event->getSubject()]));
}
});
$dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
- $eventSource->send('success', $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
+ $eventSource->send('success', $l->t('[%d / %d]: Checking table %s', [$event['step'], $event['max'], $event->getSubject()]));
}
});
$feedBack = new FeedBackHandler($eventSource, $l);