From: Arthur Schiwon Date: Fri, 26 May 2017 11:44:43 +0000 (+0200) Subject: fix paging X-Git-Tag: v12.0.1RC1~69^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2567a350f451556b92d8b27df1a5afe71531da79;p=nextcloud-server.git fix paging Signed-off-by: Arthur Schiwon --- diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 9293ae786bf..f342785ee03 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -956,10 +956,11 @@ class Access extends LDAPUtility implements IUserTools { } array_unshift($arguments, $cr); // php no longer supports call-time pass-by-reference - // make special case for controlPagedResultResponse as the third argument is a reference + // thus cannot support controlPagedResultResponse as the third argument + // is a reference $doMethod = function () use ($command, &$arguments) { if ($command == 'controlPagedResultResponse') { - return $this->ldap->controlPagedResultResponse($arguments[0], $arguments[1], $arguments[2]); + throw new \InvalidArgumentException('Invoker does not support controlPagedResultResponse, call LDAP Wrapper directly instead.'); } else { return call_user_func_array(array($this->ldap, $command), $arguments); } @@ -1042,7 +1043,7 @@ class Access extends LDAPUtility implements IUserTools { if($pagedSearchOK) { $cr = $this->connection->getConnectionResource(); foreach($sr as $key => $res) { - if($this->invokeLDAPMethod('controlPagedResultResponse', $cr, $res, $cookie)) { + if($this->ldap->controlPagedResultResponse($cr, $res, $cookie)) { $this->setPagedResultCookie($base[$key], $filter, $limit, $offset, $cookie); } }