summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-22 19:47:10 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-22 19:47:10 +0100
commit4dfdb2720c66c1dcc0964baf9e83a9ce56f41616 (patch)
tree2a46d9b673a3aca6cd3726d0e5e57a8845360369 /apps
parent4537eaac41dc9ddf7e73302935a61219d60b8f52 (diff)
downloadnextcloud-server-4dfdb2720c66c1dcc0964baf9e83a9ce56f41616.tar.gz
nextcloud-server-4dfdb2720c66c1dcc0964baf9e83a9ce56f41616.zip
Case insensitive search in contacts - fixes #22575
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/carddav/carddavbackend.php2
-rw-r--r--apps/dav/tests/unit/carddav/carddavbackendtest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/carddav/carddavbackend.php b/apps/dav/lib/carddav/carddavbackend.php
index 56fa652d798..61bdec52479 100644
--- a/apps/dav/lib/carddav/carddavbackend.php
+++ b/apps/dav/lib/carddav/carddavbackend.php
@@ -776,7 +776,7 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$query2->orWhere(
$query2->expr()->andX(
$query2->expr()->eq('cp.name', $query->createNamedParameter($property)),
- $query2->expr()->like('cp.value', $query->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%'))
+ $query2->expr()->ilike('cp.value', $query->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%'))
)
);
}
diff --git a/apps/dav/tests/unit/carddav/carddavbackendtest.php b/apps/dav/tests/unit/carddav/carddavbackendtest.php
index f920eb47b6e..401041d6e39 100644
--- a/apps/dav/tests/unit/carddav/carddavbackendtest.php
+++ b/apps/dav/tests/unit/carddav/carddavbackendtest.php
@@ -547,8 +547,8 @@ class CardDavBackendTest extends TestCase {
['John', ['FN'], ['John Doe', 'John M. Doe']],
['M. Doe', ['FN'], ['John M. Doe']],
['Do', ['FN'], ['John Doe', 'John M. Doe']],
- // check if duplicates are handled correctly
- ['John', ['FN', 'CLOUD'], ['John Doe', 'John M. Doe']],
+ 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], ['John Doe', 'John M. Doe']],
+ 'case insensitive' => ['john', ['FN'], ['John Doe', 'John M. Doe']]
];
}