mirror of
https://github.com/nextcloud/server.git
synced 2025-03-16 01:05:24 +00:00
Use default page size for jumping to desired offset
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
b313e2a507
commit
b186cffdbe
1 changed files with 3 additions and 2 deletions
|
@ -1993,8 +1993,9 @@ class Access extends LDAPUtility {
|
||||||
// no cookie known from a potential previous search. We need
|
// no cookie known from a potential previous search. We need
|
||||||
// to start from 0 to come to the desired page. cookie value
|
// to start from 0 to come to the desired page. cookie value
|
||||||
// of '0' is valid, because 389ds
|
// of '0' is valid, because 389ds
|
||||||
$reOffset = ($offset - $pageSize) < 0 ? 0 : $offset - $pageSize;
|
$defaultPageSize = (int)$this->connection->ldapPagingSize;
|
||||||
$this->search($filter, $base, $attr, $pageSize, $reOffset, true);
|
$reOffset = ($offset - $defaultPageSize) < 0 ? 0 : $offset - $defaultPageSize;
|
||||||
|
$this->search($filter, $base, $attr, $defaultPageSize, $reOffset, true);
|
||||||
if (!$this->hasMoreResults()) {
|
if (!$this->hasMoreResults()) {
|
||||||
// when the cookie is reset with != 0 offset, there are no further
|
// when the cookie is reset with != 0 offset, there are no further
|
||||||
// results, so stop.
|
// results, so stop.
|
||||||
|
|
Loading…
Reference in a new issue