mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
set up paged search when limit is 0
This commit is contained in:
parent
7e0fd8fb50
commit
42d3ed47e2
1 changed files with 11 additions and 0 deletions
|
|
@ -1443,6 +1443,17 @@ class Access extends LDAPUtility implements user\IUserTools {
|
|||
}
|
||||
|
||||
}
|
||||
} else if($this->connection->hasPagedResultSupport && $limit === 0) {
|
||||
// a search without limit was requested. However, if we do use
|
||||
// Paged Search once, we always must do it. This requires us to
|
||||
// initialize it with the configured page size.
|
||||
$this->abandonPagedSearch();
|
||||
// in case someone set it to 0 … use 500, otherwise no results will
|
||||
// be returned.
|
||||
$pageSize = intval($this->connection->ldapPagingSize) > 0 ? intval($this->connection->ldapPagingSize) : 500;
|
||||
$pagedSearchOK = $this->ldap->controlPagedResult(
|
||||
$this->connection->getConnectionResource(), $pageSize, false, ''
|
||||
);
|
||||
}
|
||||
|
||||
return $pagedSearchOK;
|
||||
|
|
|
|||
Loading…
Reference in a new issue