This commit is contained in:
backportbot-nextcloud[bot] 2021-06-03 18:50:14 +00:00 committed by GitHub
commit 37a5c5b8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -319,14 +319,9 @@ class CacheJail extends CacheWrapper {
ISearchBinaryOperator::OPERATOR_AND,
[new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, [$prefixFilter, $rootFilter]) , $query->getSearchOperation()]
);
$simpleQuery = new SearchQuery($operation, 0, 0, $query->getOrder(), $query->getUser());
$simpleQuery = new SearchQuery($operation, $query->getLimit(), $query->getOffset(), $query->getOrder(), $query->getUser());
$results = $this->getCache()->searchQuery($simpleQuery);
$results = $this->formatSearchResults($results);
$limit = $query->getLimit() === 0 ? null : $query->getLimit();
$results = array_slice($results, $query->getOffset(), $limit);
return $results;
return $this->formatSearchResults($results);
}
/**