LDAP: extend LDAP wrapper search method for sizelimit, improves performance in wizard

This commit is contained in:
Arthur Schiwon 2014-02-04 17:56:53 +01:00
parent 45d07906b8
commit bc17b40650
2 changed files with 6 additions and 4 deletions

View File

@ -145,9 +145,11 @@ interface ILDAPWrapper {
* @param $baseDN The DN of the entry to read from * @param $baseDN The DN of the entry to read from
* @param $filter An LDAP filter * @param $filter An LDAP filter
* @param $attr array of the attributes to read * @param $attr array of the attributes to read
* @param $attrsonly optional, 1 if only attribute types shall be returned
* @param $limit optional, limits the result entries
* @return an LDAP search result resource, false on error * @return an LDAP search result resource, false on error
*/ */
public function search($link, $baseDN, $filter, $attr); public function search($link, $baseDN, $filter, $attr, $attrsonly = 0, $limit = 0);
/** /**
* @brief Sets the value of the specified option to be $value * @brief Sets the value of the specified option to be $value

View File

@ -85,9 +85,9 @@ class LDAP implements ILDAPWrapper {
return $this->invokeLDAPMethod('read', $link, $baseDN, $filter, $attr); return $this->invokeLDAPMethod('read', $link, $baseDN, $filter, $attr);
} }
public function search($link, $baseDN, $filter, $attr) { public function search($link, $baseDN, $filter, $attr, $attrsonly = 0, $limit = 0) {
return $this->invokeLDAPMethod('search', $link, $baseDN, return $this->invokeLDAPMethod('search', $link, $baseDN, $filter,
$filter, $attr); $attr, $attrsonly, $limit);
} }
public function setOption($link, $option, $value) { public function setOption($link, $option, $value) {