Ldap\Connection: Fix result counting

Missed to adjust this once I refactored the query execution..

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-04 16:24:17 +02:00
parent 3e8ef5cc0f
commit d0a353c3da
1 changed files with 3 additions and 8 deletions

View File

@ -241,14 +241,9 @@ class Connection implements Selectable
$this->connect();
$this->bind();
$count = 0;
$results = $this->runQuery($query);
while (! empty($results)) {
$count += ldap_count_entries($this->ds, $results);
$results = $this->runQuery($query);
}
return $count;
// TODO: That's still not the best solution, this should probably not request any attributes
$res = $this->runQuery($query);
return count($res);
}
public function fetchAll(Query $query, $fields = array())