Merge pull request #59409 from nextcloud/backport/59388/stable33
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run

[stable33] fix(file-search): use default limit to search query if not provided on request body
This commit is contained in:
Ferdinand Thiessen 2026-04-03 17:48:24 +02:00 committed by GitHub
commit d231e7da42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -343,6 +343,7 @@ class FileSearchBackend implements ISearchBackend {
}, $query->orderBy);
$limit = $query->limit;
$maxResults = $limit->maxResults !== 0 ? (int)$limit->maxResults : 100;
$offset = $limit->firstResult;
$limitHome = false;
@ -370,7 +371,7 @@ class FileSearchBackend implements ISearchBackend {
return new SearchQuery(
$operators,
(int)$limit->maxResults,
$maxResults,
$offset,
$orders,
$this->user,

View file

@ -97,7 +97,7 @@ class FileSearchBackendTest extends TestCase {
'name',
'foo'
),
0,
100,
0,
[],
$this->user
@ -126,7 +126,7 @@ class FileSearchBackendTest extends TestCase {
'mimetype',
'foo'
),
0,
100,
0,
[],
$this->user
@ -155,7 +155,7 @@ class FileSearchBackendTest extends TestCase {
'size',
10
),
0,
100,
0,
[],
$this->user
@ -184,7 +184,7 @@ class FileSearchBackendTest extends TestCase {
'mtime',
10
),
0,
100,
0,
[],
$this->user
@ -213,7 +213,7 @@ class FileSearchBackendTest extends TestCase {
'mimetype',
FileInfo::MIMETYPE_FOLDER
),
0,
100,
0,
[],
$this->user