Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/dav/lib/Files/FileSearchBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ private function transformQuery(Query $query, ?SearchBinaryOperator $scopeOperat
}, $query->orderBy);

$limit = $query->limit;
$maxResults = $limit->maxResults !== 0 ? (int)$limit->maxResults : 100;
$offset = $limit->firstResult;

$limitHome = false;
Expand Down Expand Up @@ -370,7 +371,7 @@ private function transformQuery(Query $query, ?SearchBinaryOperator $scopeOperat

return new SearchQuery(
$operators,
(int)$limit->maxResults,
$maxResults,
$offset,
$orders,
$this->user,
Expand Down
10 changes: 5 additions & 5 deletions apps/dav/tests/unit/Files/FileSearchBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function testSearchFilename(): void {
'name',
'foo'
),
0,
100,
0,
[],
$this->user
Expand Down Expand Up @@ -126,7 +126,7 @@ public function testSearchMimetype(): void {
'mimetype',
'foo'
),
0,
100,
0,
[],
$this->user
Expand Down Expand Up @@ -155,7 +155,7 @@ public function testSearchSize(): void {
'size',
10
),
0,
100,
0,
[],
$this->user
Expand Down Expand Up @@ -184,7 +184,7 @@ public function testSearchMtime(): void {
'mtime',
10
),
0,
100,
0,
[],
$this->user
Expand Down Expand Up @@ -213,7 +213,7 @@ public function testSearchIsCollection(): void {
'mimetype',
FileInfo::MIMETYPE_FOLDER
),
0,
100,
0,
[],
$this->user
Expand Down
Loading