diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-21 11:17:46 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-21 11:17:46 +0000 |
| commit | 62269b71135bd7dca7c6adf7618609afed561ba8 (patch) | |
| tree | 7391d8a8abb49ebad812a7893156973d2a55df42 /roundcubemail/program/include/rcube_ldap.php | |
| parent | dff43bfebb3ba1b3cd07ef6819fbf52d2bcc5411 (diff) | |
Add option 'searchonly' for address books; currently used by LDAP directories
git-svn-id: https://svn.roundcube.net/trunk@5258 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index c6ca88e5e..13e7b5448 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/program/include/rcube_ldap.php @@ -71,6 +71,9 @@ class rcube_ldap extends rcube_addressbook function __construct($p, $debug=false, $mail_domain=NULL) { $this->prop = $p; + + if (isset($p['searchonly'])) + $this->searchonly = $p['searchonly']; // check if groups are configured if (is_array($p['groups']) && count($p['groups'])) { @@ -429,6 +432,12 @@ class rcube_ldap extends rcube_addressbook */ function list_records($cols=null, $subset=0) { + if ($this->prop['searchonly'] && empty($this->filter) && !$this->group_id) { + $this->result = new rcube_result_set(0); + $this->result->searchonly = true; + return $this->result; + } + // add general filter to query if (!empty($this->prop['filter']) && empty($this->filter)) { |
