Skip to content

Commit

Permalink
Remove search re-index warning from looping function in build-nested-…
Browse files Browse the repository at this point in the history
…set task
  • Loading branch information
phalene-bytes committed Oct 18, 2023
1 parent 1490c23 commit 84f99db
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/task/propel/propelBuildNestedSetTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ public function execute($arguments = [], $options = [])
$this->conn->commit();
}

if (!$options['index']) {
$this->logSection(
'propel',
'Note: you will need to rebuild your search index for updates to show up properly in search results.'
);
}
$this->logSection('propel', 'Done!');
}

Expand Down Expand Up @@ -157,11 +163,6 @@ protected function recursivelyUpdateTree($node, $classname)
if ($node['id'] != $classname::ROOT_ID) {
$this->reindexLft($classname, $node['id'], $node['lft']);
}
} else {
$this->logSection(
'propel',
'Note: you will need to rebuild your search index for updates to show up properly in search results.'
);
}

return $width;
Expand All @@ -173,4 +174,4 @@ protected function reindexLft(string $classname, int $id, int $lft)
$classname, $id, ['lft' => $lft]
);
}
}
}

0 comments on commit 84f99db

Please sign in to comment.