summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-06-23 11:27:41 +0200
committerGitHub <noreply@github.com>2021-06-23 11:27:41 +0200
commit6c65c9c44d6059e9a865ef5c75154ed86cb15881 (patch)
tree140e47b4b14319d1376c627d3489e1fcb44db231 /apps
parentee7a4842844f19fb14f332ef85252d6adc968283 (diff)
parenta317f0ff020a26f687ae188f6d282f09872dd515 (diff)
downloadnextcloud-server-6c65c9c44d6059e9a865ef5c75154ed86cb15881.tar.gz
nextcloud-server-6c65c9c44d6059e9a865ef5c75154ed86cb15881.zip
Merge pull request #27561 from nextcloud/dav-search-offset
allow setting offset for dav search queries not limited to the users home storage
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index 1732b0cc85a..71231f65c24 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -272,10 +272,9 @@ class FileSearchBackend implements ISearchBackend {
* @return ISearchQuery
*/
private function transformQuery(Query $query): ISearchQuery {
- // TODO offset
$limit = $query->limit;
$orders = array_map([$this, 'mapSearchOrder'], $query->orderBy);
- $offset = 0;
+ $offset = $limit->firstResult;
$limitHome = false;
$ownerProp = $this->extractWhereValue($query->where, FilesPlugin::OWNER_ID_PROPERTYNAME, Operator::OPERATION_EQUAL);
@@ -285,7 +284,6 @@ class FileSearchBackend implements ISearchBackend {
} else {
throw new \InvalidArgumentException("Invalid search value for '{http://owncloud.org/ns}owner-id', only the current user id is allowed");
}
- $offset = $limit->firstResult;
}
return new SearchQuery(