revert resolving of recursion (3628d4d65d)

without recursion we have issues with internal states. paged search status
are set to false, cookies are not being set. In the end we have  endless
requests which pile up enormously with a high initial offset.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2018-01-11 15:17:18 +01:00
parent 9031ae0281
commit f84ec92563
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 2 additions and 5 deletions

View File

@ -1914,11 +1914,8 @@ class Access extends LDAPUtility implements IUserTools {
// no cookie known from a potential previous search. We need
// to start from 0 to come to the desired page. cookie value
// of '0' is valid, because 389ds
$reOffset = 0;
while($reOffset < $offset) {
$reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit;
$this->search($filter, array($base), $attr, $limit, $reOffset, true);
$reOffset += $limit;
}
$cookie = $this->getPagedResultCookie($base, $filter, $limit, $offset);
//still no cookie? obviously, the server does not like us. Let's skip paging efforts.
// '0' is valid, because 389ds