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

View File

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