From 327f9afbc0e015864c64b29b412e03142f40ca16 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 16 May 2010 23:05:13 +0200 Subject: [PATCH] [ticket/8792] Add LDAP_SEARCH_FAILED string for when ldap_search() fails. No longer use LDAP_NO_SERVER_CONNECTION in case ldap_search() fails. Add and use LDAP_SEARCH_FAILED instead, so users can tell the difference between ldap_connect() failing and ldap_search() failing. PHPBB3-8792 --- phpBB/includes/auth/auth_ldap.php | 2 +- phpBB/language/en/common.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php index a6092baba5..e8c957aaa3 100644 --- a/phpBB/includes/auth/auth_ldap.php +++ b/phpBB/includes/auth/auth_ldap.php @@ -74,7 +74,7 @@ function init_ldap() if ($search === false) { - return $user->lang['LDAP_NO_SERVER_CONNECTION']; + return $user->lang['LDAP_SEARCH_FAILED']; } $result = @ldap_get_entries($ldap, $search); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index a3d47b5b59..325a20bf02 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -295,6 +295,7 @@ $lang = array_merge($lang, array( 'LAST_VISIT' => 'Last visit', 'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.', 'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.', + 'LDAP_SEARCH_FAILED' => 'An error occured while searching the LDAP directory.', 'LEGEND' => 'Legend', 'LOCATION' => 'Location', 'LOCK_POST' => 'Lock post',