summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-04-29 14:48:41 +0200
committerJoas Schilling <coding@schilljs.com>2020-04-29 14:48:41 +0200
commitf662d3663b819f6bfb1333385c2d2c080497960c (patch)
tree3e520c1b17d38c3f8eface5b63afa593def8e81b /apps/dav/lib
parentb219eadb8f3f459f2c71e937dfd3542f0792da8e (diff)
downloadnextcloud-server-f662d3663b819f6bfb1333385c2d2c080497960c.tar.gz
nextcloud-server-f662d3663b819f6bfb1333385c2d2c080497960c.zip
Temporary fix contacts search
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 6081ac31be3..a5d50762922 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -966,12 +966,14 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$query2->andWhere($query2->expr()->ilike('cp.value', $query->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%')));
}
}
- if (isset($options['limit'])) {
- $query2->setMaxResults($options['limit']);
- }
- if (isset($options['offset'])) {
- $query2->setFirstResult($options['offset']);
- }
+// // FIXME Broken on MySQL: SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
+// // FIXME Should use 2 queries instead
+// if (isset($options['limit'])) {
+// $query2->setMaxResults($options['limit']);
+// }
+// if (isset($options['offset'])) {
+// $query2->setFirstResult($options['offset']);
+// }
$query->select('c.carddata', 'c.uri')->from($this->dbCardsTable, 'c')
->where($query->expr()->in('c.id', $query->createFunction($query2->getSQL())));