From 79c9df8dc1eb54527406313d6e8d56aaf7a41f59 Mon Sep 17 00:00:00 2001 From: Marco Nassabain Date: Wed, 17 Mar 2021 08:46:21 +0100 Subject: =?UTF-8?q?=F0=9F=8E=A8=20Item:=20implode=20categories=20for=20sea?= =?UTF-8?q?rch=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Nassabain --- lib/Db/Item.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Db/Item.php b/lib/Db/Item.php index fe2cd6ac5..97b3bc1ca 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -126,12 +126,16 @@ class Item extends Entity implements IAPI, \JsonSerializable public function generateSearchIndex(): void { + $categoriesString = !empty($this->getCategories()) + ? implode('', $this->getCategories()) + : ''; + $this->setSearchIndex( mb_strtolower( html_entity_decode(strip_tags($this->getBody())) . html_entity_decode($this->getAuthor()) . html_entity_decode($this->getTitle()) . - html_entity_decode($this->getCategoriesJson()) . + html_entity_decode($categoriesString) . $this->getUrl(), 'UTF-8' ) -- cgit v1.2.3