Fix parsing ldap URI for cases where hostname is non-empty

pull/229/merge
Aleksander Machniak 10 years ago
parent 759566fe99
commit 5aa1d2005b

@ -698,8 +698,9 @@ class rcube_ldap extends rcube_addressbook
for ($i=0; $i < $entry['memberurl']['count']; $i++) { for ($i=0; $i < $entry['memberurl']['count']; $i++) {
// extract components from url // extract components from url
if (!preg_match('!ldap:///([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m)) if (!preg_match('!ldap://[^/]*/([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m)) {
continue; continue;
}
// add search filter if any // add search filter if any
$filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3]; $filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3];

Loading…
Cancel
Save