@ -105,8 +105,8 @@ function rcmail_ldap_public_search_form($attrib)
{
// store the search fields in a js array for each server
$js = '';
foreach ($server['search_fields'] as $k => $search_field)
$js .= "'$search_field', ";
foreach ($server['search_fields'] as $search_name => $search_value)
$js .= "['$search_name', '$search_value'], ";
// store whether this server accepts fuzzy search as last item in array
$js .= $server['fuzzy_search'] ? "'fuzzy'" : "'exact'";
@ -34,8 +34,8 @@ function updateLdapSearchFields(element) {
// the last array value is for fuzzy search, so skip that one
if (i < (server_fields.length - 1)) {
var new_option = document.createElement('option');
new_option.text = server_fields[i];
new_option.value = server_fields[i];
new_option.text = server_fields[i][0];
new_option.value = server_fields[i][1];
// standards compliant browsers
try {