summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-17 08:46:21 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-03-17 08:58:42 +0100
commit79c9df8dc1eb54527406313d6e8d56aaf7a41f59 (patch)
treebd902983a8aa5b3d49876f99850ac322cf79be0a
parent3ca55613b60ad947b2365a113ae97c6b22667783 (diff)
🎨 Item: implode categories for search index
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
-rw-r--r--lib/Db/Item.php6
1 files changed, 5 insertions, 1 deletions
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'
)