summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-03-20 10:59:58 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-04-09 11:31:56 +0200
commitbdc418d1f99738d45b2a0e4fab07c974d5b58681 (patch)
tree570701d9794e85e73128c5bb3ef6eb176233c7c4
parent43402c56ddbe5e4041fdcdc0605d16badeadb69b (diff)
downloadnextcloud-server-bdc418d1f99738d45b2a0e4fab07c974d5b58681.tar.gz
nextcloud-server-bdc418d1f99738d45b2a0e4fab07c974d5b58681.zip
var count is assigned in the inner loop so it must be checked inside there to be properly used as part of the exit condition of the outer loop
-rw-r--r--apps/user_ldap/lib/access.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 1af993677cd..d135ee5b735 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -786,6 +786,7 @@ class Access extends LDAPUtility {
$cr = $this->connection->getConnectionResource();
do {
+ $continue = false;
$search = $this->executeSearch($filter, $base, $attr,
$limit, $offset);
if($search === false) {
@@ -798,12 +799,15 @@ class Access extends LDAPUtility {
if($count !== false) {
$counter += $count;
}
+ if($count === $limit) {
+ $continue = true;
+ }
}
$this->processPagedSearchStatus($sr, $filter, $base, $count, $limit,
$offset, $pagedSearchOK, $skipHandling);
$offset += $limit;
- } while($count === $limit);
+ } while($continue);
return $counter;
}