- Stop execution when LDAP addressbook is configured but PHP's ldap functions doesn't exists

release-0.6
alecpl 14 years ago
parent 630f0e41ac
commit 56651c15c8

@ -128,7 +128,8 @@ class rcube_ldap extends rcube_addressbook
if (!function_exists('ldap_connect'))
raise_error(array('code' => 100, 'type' => 'ldap',
'file' => __FILE__, 'line' => __LINE__,
'message' => "No ldap support in this installation of PHP"), true);
'message' => "No ldap support in this installation of PHP"),
true, true);
if (is_resource($this->conn))
return true;
@ -251,8 +252,7 @@ class rcube_ldap extends rcube_addressbook
}
if (!function_exists('ldap_sasl_bind')) {
raise_error(array(
'code' => 100, 'type' => 'ldap',
raise_error(array('code' => 100, 'type' => 'ldap',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Unable to bind: ldap_sasl_bind() not exists"),
true, true);
@ -310,11 +310,11 @@ class rcube_ldap extends rcube_addressbook
$this->_debug("S: ".ldap_error($this->conn));
$error = array(
raise_error(array(
'code' => ldap_errno($this->conn), 'type' => 'ldap',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Bind failed for dn=$dn: ".ldap_error($this->conn));
raise_error($error,true);
'message' => "Bind failed for dn=$dn: ".ldap_error($this->conn)),
true);
return false;
}

Loading…
Cancel
Save