diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-04 19:31:42 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-04 19:31:42 +0000 |
| commit | ebf2e746665363a5f92946580ead057b60b9ba86 (patch) | |
| tree | a82319f6bfa113bb87977d862650254fe80eec13 | |
| parent | 4ee28b8383a1d180c314bf4883c815074397e01b (diff) | |
- Stop execution when LDAP addressbook is configured but PHP's ldap functions doesn't exists
git-svn-id: https://svn.roundcube.net/trunk@4730 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index 742cb6412..d9f5a104f 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/program/include/rcube_ldap.php @@ -127,8 +127,9 @@ 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); + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "No ldap support in this installation of PHP"), + true, true); if (is_resource($this->conn)) return true; @@ -251,11 +252,10 @@ 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); + true, true); } if (!empty($authz)) { @@ -310,11 +310,11 @@ class rcube_ldap extends rcube_addressbook $this->_debug("S: ".ldap_error($this->conn)); - $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); + raise_error(array( + 'code' => ldap_errno($this->conn), 'type' => 'ldap', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Bind failed for dn=$dn: ".ldap_error($this->conn)), + true); return false; } |
