fix error with lang search
This commit is contained in:
parent
8cbbcc01a9
commit
8c8a542127
@ -89,7 +89,11 @@ $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alph
|
|||||||
$search = array();
|
$search = array();
|
||||||
foreach ($object->fields as $key => $val) {
|
foreach ($object->fields as $key => $val) {
|
||||||
if (GETPOST('search_'.$key, 'alpha') !== '') {
|
if (GETPOST('search_'.$key, 'alpha') !== '') {
|
||||||
$search[$key] = GETPOST('search_'.$key, 'alpha');
|
if ($key == "lang") {
|
||||||
|
$search[$key] = GETPOST('search_'.$key, 'alpha')!='0' ? GETPOST('search_'.$key, 'alpha') : '';
|
||||||
|
} else {
|
||||||
|
$search[$key] = GETPOST('search_'.$key, 'alpha');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||||
$search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int'));
|
$search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int'));
|
||||||
@ -118,15 +122,6 @@ foreach ($object->fields as $key => $val) {
|
|||||||
'position'=>$val['position'],
|
'position'=>$val['position'],
|
||||||
'help'=> isset($val['help']) ? $val['help'] : ''
|
'help'=> isset($val['help']) ? $val['help'] : ''
|
||||||
);
|
);
|
||||||
} elseif ($key = 'lang') {
|
|
||||||
$visible = (int) dol_eval($val['visible'], 1);
|
|
||||||
$arrayfields['t.'.$key] = array(
|
|
||||||
'label'=>$val['label'],
|
|
||||||
'checked'=>(($visible < 0) ? 0 : 1),
|
|
||||||
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
|
|
||||||
'position'=>$val['position'],
|
|
||||||
'help'=> isset($val['help']) ? $val['help'] : ''
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user