diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-09-18 17:00:51 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-09-30 12:42:37 +0200 |
commit | 53ec32807abbde7854bcfe54b3c85797d62ec4a6 (patch) | |
tree | 46550e56d275c1e1be47440488b3a32f47227599 /apps/user_ldap/lib | |
parent | 9a63693227b3fd7a44fe3f89d2ab6149992f69e4 (diff) | |
download | nextcloud-server-53ec32807abbde7854bcfe54b3c85797d62ec4a6.tar.gz nextcloud-server-53ec32807abbde7854bcfe54b3c85797d62ec4a6.zip |
abandon ongoing paged search before starting a new one
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/access.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 392c0957d64..760d23bf44c 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -1376,7 +1376,7 @@ class Access extends LDAPUtility implements user\IUserTools { * resets a running Paged Search operation */ private function abandonPagedSearch() { - if(count($this->cookies) > 0) { + if(!empty($this->lastCookie)) { $cr = $this->connection->getConnectionResource(); $this->ldap->controlPagedResult($cr, 0, false, $this->lastCookie); $this->getPagedSearchResultState(); @@ -1475,9 +1475,8 @@ class Access extends LDAPUtility implements user\IUserTools { } } if(!is_null($cookie)) { - if($offset > 0) { - \OCP\Util::writeLog('user_ldap', 'Cookie '.CRC32($cookie), \OCP\Util::INFO); - } + //since offset = 0, this is a new search. We abandon other searches that might be ongoing. + $this->abandonPagedSearch(); $pagedSearchOK = $this->ldap->controlPagedResult( $this->connection->getConnectionResource(), $limit, false, $cookie); |