summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-11-26 19:51:29 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2015-11-26 19:51:49 +0100
commit6f48a74ead80c57e291ca2be78645449e99ae5f0 (patch)
tree783d228246b38fe135f772461958d00f56900ac0 /service
parent050ca4af5a2c72ecd31305ed7b91afc4f411efa1 (diff)
add autoupdate for indices
Diffstat (limited to 'service')
-rw-r--r--service/itemservice.php17
1 files changed, 1 insertions, 16 deletions
diff --git a/service/itemservice.php b/service/itemservice.php
index 0b0746258..ec6bee8bd 100644
--- a/service/itemservice.php
+++ b/service/itemservice.php
@@ -259,28 +259,13 @@ class ItemService extends Service {
/**
* Regenerates the search index for all items
*/
- public function generateSearchIndices($progressbar=null) {
- if ($progressbar) {
- $this->systemConfig->setSystemValue('maintenance', true);
- $progressbar = $progressbar(count($rows));
- $progressbar->setFormat('verbose');
- }
-
+ public function generateSearchIndices() {
$rows = $this->itemMapper->findAllItemIdsAndUsers();
foreach ($rows as $row) {
$item = $this->find($row['id'], $row['user_id']);
$item->generateSearchIndex();
$this->itemMapper->update($item);
-
- if ($progressbar) {
- $progressbar->advance();
- }
- }
-
- if ($progressbar) {
- $progressbar->finish();
- $this->systemConfig->setSystemValue('maintenance', false);
}
}