summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <BernhardPosselt@users.noreply.github.com>2016-03-24 13:25:28 +0100
committerBernhard Posselt <BernhardPosselt@users.noreply.github.com>2016-03-24 13:25:28 +0100
commitbae6d8a8f2802ba578aad51f6abc7ee187a1c187 (patch)
treed0cf83ea83969825765aad38f39789d9da6eb2ee
parent4c3d2639c49e87b77a5009dc804b078b44f4e8ec (diff)
parentbd4615b672af997947655cc4381753eb42608ae1 (diff)
Merge pull request #945 from Loki3000/master
Fix multibyte search bug
-rw-r--r--db/item.php2
-rw-r--r--db/itemmapper.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/db/item.php b/db/item.php
index 1916ba6a1..a5daacc65 100644
--- a/db/item.php
+++ b/db/item.php
@@ -216,7 +216,7 @@ class Item extends Entity implements IAPI, \JsonSerializable {
public function generateSearchIndex() {
$this->setSearchIndex(
- strtolower(
+ mb_strtolower(
html_entity_decode(strip_tags($this->getBody())) .
html_entity_decode($this->getAuthor()) .
html_entity_decode($this->getTitle()) .
diff --git a/db/itemmapper.php b/db/itemmapper.php
index 27a61db80..b7a594122 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -68,7 +68,7 @@ class ItemMapper extends NewsMapper {
private function buildLikeParameters($search=[]) {
return array_map(function ($param) {
$param = addcslashes($param, '\\_%');
- return '%' . strtolower($param) . '%';
+ return '%' . mb_strtolower($param) . '%';
}, $search);
}