This commit is contained in:
Laurent Destailleur 2022-07-04 15:48:50 +02:00
commit 36a478743f
2 changed files with 5 additions and 2 deletions

View File

@ -4949,7 +4949,10 @@ class Form
foreach ($formquestion as $key => $input) { foreach ($formquestion as $key => $input) {
if (is_array($input) && !empty($input)) { if (is_array($input) && !empty($input)) {
if ($input['type'] == 'hidden') { if ($input['type'] == 'hidden') {
$more .= '<input type="hidden" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'" value="'.dol_escape_htmltag($input['value']).'">'."\n"; $moreattr = (!empty($input['moreattr']) ? ' '.$input['moreattr'] : '');
$morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : '');
$more .= '<input type="hidden" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'" value="'.dol_escape_htmltag($input['value']).'" class="'.$morecss.'"'.$moreattr.'>'."\n";
} }
} }
} }

View File

@ -3796,7 +3796,7 @@ class User extends CommonObject
foreach ($filter as $key => $value) { foreach ($filter as $key => $value) {
if ($key == 't.rowid') { if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value); $sqlwhere[] = $key." = ".((int) $value);
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { } elseif (isset($this->fields[$key]['type']) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'"; $sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') { } elseif ($key == 'customsql') {
$sqlwhere[] = $value; $sqlwhere[] = $value;