]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix paging 5210/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Fri, 26 May 2017 11:44:43 +0000 (13:44 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 29 May 2017 22:53:32 +0000 (00:53 +0200)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/user_ldap/lib/Access.php

index 9293ae786bfa917d715c3c59975ca908b4c614e8..f342785ee0361ed1c220c0ee5aeb78295e60b781 100644 (file)
@@ -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);
                                }
                        }