diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-03-17 08:46:21 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-17 08:58:42 +0100 |
commit | 79c9df8dc1eb54527406313d6e8d56aaf7a41f59 (patch) | |
tree | bd902983a8aa5b3d49876f99850ac322cf79be0a /lib | |
parent | 3ca55613b60ad947b2365a113ae97c6b22667783 (diff) |
🎨 Item: implode categories for search index
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/Item.php | 6 |
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' ) |