Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-02-02 20:07:48 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-02-14 01:06:46 +0300
commit0b58b0faf3f6aba4ec78935e21d4201048ccfcc9 (patch)
treeb2b402ad2f61e37f5ffa5fcdffda883c6f12617a /core/Command/Maintenance
parent004f7fa8e141b159cc76f99cc041eec215444236 (diff)
Do not run getRepairSteps in register_commands
getRepairSteps is quite expensive (because every repair step is initialized and their dependencies are injected). Should not call it during register. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/Command/Maintenance')
-rw-r--r--core/Command/Maintenance/Repair.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php
index 71d13cd29f3..e9595a22285 100644
--- a/core/Command/Maintenance/Repair.php
+++ b/core/Command/Maintenance/Repair.php
@@ -77,11 +77,14 @@ class Repair extends Command {
}
protected function execute(InputInterface $input, OutputInterface $output) {
- $includeExpensive = $input->getOption('include-expensive');
- if ($includeExpensive) {
- foreach ($this->repair->getExpensiveRepairSteps() as $step) {
- $this->repair->addStep($step);
- }
+ $repairSteps = $this->repair::getRepairSteps();
+
+ if ($input->getOption('include-expensive')) {
+ $repairSteps = array_merge($repairSteps, $this->repair::getExpensiveRepairSteps());
+ }
+
+ foreach ($repairSteps as $step) {
+ $this->repair->addStep($step);
}
$apps = $this->appManager->getInstalledApps();