Ver código fonte

Merge pull request #27561 from nextcloud/dav-search-offset

allow setting offset for dav search queries not limited to the users home storage
tags/v22.0.0rc1
blizzz 3 anos atrás
pai
commit
6c65c9c44d
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1
    3
      apps/dav/lib/Files/FileSearchBackend.php

+ 1
- 3
apps/dav/lib/Files/FileSearchBackend.php Ver arquivo

@@ -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(

Carregando…
Cancelar
Salvar