diff options
-rw-r--r-- | core/Command/Maintenance/Repair.php | 2 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 2 | ||||
-rw-r--r-- | core/ajax/update.php | 2 | ||||
-rw-r--r-- | lib/private/Repair.php | 2 | ||||
-rw-r--r-- | lib/private/Repair/Events/RepairAdvanceEvent.php | 11 | ||||
-rw-r--r-- | lib/private/Updater.php | 2 |
6 files changed, 10 insertions, 11 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index 7f8d98d758d..e1d1862f3f4 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -127,7 +127,7 @@ class Repair extends Command { if ($event instanceof RepairStartEvent) { $this->progress->start($event->getMaxStep()); } elseif ($event instanceof RepairAdvanceEvent) { - $this->progress->advance($event->getCurrentStep()); + $this->progress->advance($event->getIncrement()); } elseif ($event instanceof RepairFinishEvent) { $this->progress->finish(); $this->output->writeln(''); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 05f0615d33b..d476b91d6bf 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -137,7 +137,7 @@ class Upgrade extends Command { if (!empty($desc)) { $progress->setMessage($desc); } - $progress->advance($event->getCurrentStep()); + $progress->advance($event->getIncrement()); } elseif ($event instanceof RepairFinishEvent) { $progress->setMessage('Done'); $progress->finish(); diff --git a/core/ajax/update.php b/core/ajax/update.php index acd8c3b22c0..0fe398df7bf 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -76,7 +76,7 @@ class FeedBackHandler { $this->progressStateStep = 0; $this->currentStep = $event->getCurrentStepName(); } elseif ($event instanceof RepairAdvanceEvent) { - $this->progressStateStep += $event->getCurrentStep(); + $this->progressStateStep += $event->getIncrement(); $desc = $event->getDescription(); if (empty($desc)) { $desc = $this->currentStep; diff --git a/lib/private/Repair.php b/lib/private/Repair.php index 97a72707d03..e2e5da79216 100644 --- a/lib/private/Repair.php +++ b/lib/private/Repair.php @@ -279,7 +279,7 @@ class Repair implements IOutput { } /** - * @param int $step + * @param int $step number of step to advance * @param string $description */ public function advance($step = 1, $description = '') { diff --git a/lib/private/Repair/Events/RepairAdvanceEvent.php b/lib/private/Repair/Events/RepairAdvanceEvent.php index 7602127cf41..174d4ec48cd 100644 --- a/lib/private/Repair/Events/RepairAdvanceEvent.php +++ b/lib/private/Repair/Events/RepairAdvanceEvent.php @@ -27,20 +27,19 @@ namespace OC\Repair\Events; use OCP\EventDispatcher\Event; class RepairAdvanceEvent extends Event { - // TODO Is that current step or step increment? - private int $current; + private int $increment; private string $description; public function __construct( - int $current, + int $increment, string $description ) { - $this->current = $current; + $this->increment = $increment; $this->description = $description; } - public function getCurrentStep(): int { - return $this->current; + public function getIncrement(): int { + return $this->increment; } public function getDescription(): string { diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 49909fc4562..78613ddbb0c 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -460,7 +460,7 @@ class Updater extends BasicEmitter { if (empty($desc)) { $desc = ''; } - $log->info(get_class($event).': ' . $desc . ' (' . $event->getCurrentStep() . ')', ['app' => 'updater']); + $log->info(get_class($event).': ' . $desc . ' (' . $event->getIncrement() . ')', ['app' => 'updater']); } elseif ($event instanceof RepairFinishEvent) { $log->info(get_class($event), ['app' => 'updater']); } elseif ($event instanceof RepairStepEvent) { |