diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index fef3882d2ff..4e7f148672b 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -142,7 +142,7 @@ if (!function_exists("ldap_connect")) { print dol_get_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"), -1); -print $langs->trans("LDAPDescContact").'
'; +print ''.$langs->trans("LDAPDescContact").'
'; print '
'; print '
'; diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 5723183735e..595afe29042 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -116,7 +116,7 @@ if (!function_exists("ldap_connect")) { print dol_get_fiche_head($head, 'groups', $langs->trans("LDAPSetup"), -1); -print $langs->trans("LDAPDescGroups").'
'; +print ''.$langs->trans("LDAPDescGroups").'
'; print '
'; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 876c31d79b1..4bdec17867e 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -190,7 +190,7 @@ print ''; print dol_get_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1); -print $langs->trans("LDAPDescMembers").'
'; +print ''.$langs->trans("LDAPDescMembers").'
'; print '
'; print ''; diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 7933b59d5e0..3c6ef9f5aa9 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -108,7 +108,7 @@ if (!function_exists("ldap_connect")) { print dol_get_fiche_head($head, 'memberstypes', $langs->trans("LDAPSetup"), -1); -print $langs->trans("LDAPDescMembersTypes").'
'; +print ''.$langs->trans("LDAPDescMembersTypes").'
'; print '
'; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index f395eb88fb4..53e142cf900 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -179,7 +179,7 @@ print ''; print dol_get_fiche_head($head, 'users', $langs->trans("LDAPSetup"), -1); -print $langs->trans("LDAPDescUsers").'
'; +print ''.$langs->trans("LDAPDescUsers").'
'; print '
'; diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 6f54229c993..689fbe6845e 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -263,6 +263,7 @@ class Ldap if ($this->result) { $this->bind = $this->result; $connected = 2; + $this->connectedServer = $host; break; } else { $this->error = ldap_errno($this->connection).' '.ldap_error($this->connection); @@ -275,6 +276,7 @@ class Ldap if ($this->result) { $this->bind = $this->result; $connected = 2; + $this->connectedServer = $host; break; } else { $this->error = ldap_errno($this->connection).' '.ldap_error($this->connection); @@ -287,6 +289,7 @@ class Ldap if ($result) { $this->bind = $this->result; $connected = 1; + $this->connectedServer = $host; break; } else { $this->error = ldap_errno($this->connection).' '.ldap_error($this->connection); @@ -297,10 +300,8 @@ class Ldap if (!$connected) { $this->unbind(); - } else { - $this->connectedServer = $host; } - } + } // End loop on each server } if ($connected) {