Skip to content

Commit

Permalink
Merge pull request #12021 from frederic34/patch-14
Browse files Browse the repository at this point in the history
fix broken search
  • Loading branch information
eldy committed Oct 3, 2019
2 parents fce3324 + 6d117a5 commit e59c701
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions htdocs/core/lib/company.lib.php
Expand Up @@ -951,7 +951,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
{
$queryName = 'search_'.substr($key, 2);
if (GETPOST($queryName, 'alpha')){
$search[$key]=GETPOST($queryName, 'alpha');
$search[substr($key, 2)]=GETPOST($queryName, 'alpha');
}
}
$search_array_options=$extrafields->getOptionalsFromPost($contactstatic->table_element, '', 'search_');
Expand Down Expand Up @@ -1047,9 +1047,8 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
print '<td class="liste_titre'.($align?' '.$align:'').'">';
if (in_array($key, array('statut'))){
print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0, 1),'1'=>$contactstatic->LibStatut(1, 1)), $search_status);
}else{
$fieldName = substr($key, 2);
print sprintf('<input type="text" class="flat maxwidth75" name="search_%s" value="%s">', $fieldName, dol_escape_htmltag($search[$key]));
} else {
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
}
print '</td>';
}
Expand Down

0 comments on commit e59c701

Please sign in to comment.