aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-23 10:48:38 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-23 10:48:38 +0100
commitfae6643e6dd4bc308170e0ab45886f110f60a639 (patch)
tree24eac23bf802608f392d9d6abc7b4a58e9acd4fb /apps/dav
parent3adb9392c52b3ddb0c4eeae16321b472bb5f79a2 (diff)
parent8754ea6c8a61d10f0972bf91cc2314be28016671 (diff)
downloadnextcloud-server-fae6643e6dd4bc308170e0ab45886f110f60a639.tar.gz
nextcloud-server-fae6643e6dd4bc308170e0ab45886f110f60a639.zip
Merge pull request #22582 from owncloud/case-insensitive-contact-search
Case insensitive contact search
Diffstat (limited to 'apps/dav')
-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']]
];
}