[Pkg-owncloud-commits] [owncloud] 14/118: set up paged search when limit is 0
David Prévot
taffit at moszumanska.debian.org
Fri Mar 27 22:13:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 860c59a3473d7c9c731a83ff3d3a3377aa478f6d
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Thu Mar 5 13:15:21 2015 +0100
set up paged search when limit is 0
---
apps/user_ldap/lib/access.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index b639482..9d5464d 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -1443,6 +1443,17 @@ class Access extends LDAPUtility implements user\IUserTools {
}
}
+ } else if($this->connection->hasPagedResultSupport && $limit === 0) {
+ // a search without limit was requested. However, if we do use
+ // Paged Search once, we always must do it. This requires us to
+ // initialize it with the configured page size.
+ $this->abandonPagedSearch();
+ // in case someone set it to 0 … use 500, otherwise no results will
+ // be returned.
+ $pageSize = intval($this->connection->ldapPagingSize) > 0 ? intval($this->connection->ldapPagingSize) : 500;
+ $pagedSearchOK = $this->ldap->controlPagedResult(
+ $this->connection->getConnectionResource(), $pageSize, false, ''
+ );
}
return $pagedSearchOK;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list