Update dict.php

This commit is contained in:
Laurent Destailleur 2020-10-25 14:43:33 +01:00 committed by GitHub
parent 3f03b678e9
commit 335d1db3a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -878,7 +878,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i++;
}
$sql .= " WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
if (in_array($rowidcol, array('code', 'code_iso'))) {
$sql .= " WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
} else {
$sql .= " WHERE ".$rowidcol." = ".((int) $rowid);
}
if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'";
dol_syslog("actionmodify", LOG_DEBUG);