mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
json query path
This commit is contained in:
parent
91761e8185
commit
feaa5e2bd0
|
|
@ -345,7 +345,7 @@ if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
|
|||
if (! empty($conf->socialnetworks->enabled)) {
|
||||
foreach ($socialnetworks as $key => $value) {
|
||||
if ($value['active'] && strlen($search_{$key})) {
|
||||
$sql.= natural_search("p.socialnetworks->>'$.".$key."'", $search_{$key});
|
||||
$sql.= natural_search("p.socialnetworks->'$.".$key."'", $search_{$key});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -895,7 +895,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|||
//Social media
|
||||
foreach ($socialnetworks as $key => $value) {
|
||||
if ($value['active']) {
|
||||
$searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->>'$.".$key."'";
|
||||
$searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -948,7 +948,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_');
|
||||
|
|
@ -1047,8 +1047,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|||
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]));
|
||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user