Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur 2023-10-10 22:40:00 +02:00
commit aee6dd55a4

View file

@ -116,7 +116,7 @@ if ($action == 'update') {
$sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transkey = '".$db->escape($transkey)."', transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".((int) GETPOST('rowid', 'int'));
$result = $db->query($sql);
if ($result > 0) {
if ($result) {
$db->commit();
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
$action = "";
@ -154,7 +154,7 @@ if ($action == 'add') {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".((int) $conf->entity).")";
$result = $db->query($sql);
if ($result > 0) {
if ($result) {
$db->commit();
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
$action = "";
@ -176,7 +176,7 @@ if ($action == 'add') {
if ($action == 'delete') {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".((int) $id);
$result = $db->query($sql);
if ($result >= 0) {
if ($result) {
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
} else {
dol_print_error($db);
@ -296,7 +296,7 @@ foreach ($modulesdir as $keydir => $tmpsearchdir) {
$result = $newlang->load($langkey, 0, 0, '', 0); // Load translation files + database overwrite
$result = $newlangfileonly->load($langkey, 0, 0, '', 1); // Load translation files only
if ($result < 0) {
if (!$result) {
print 'Failed to load language file '.$tmpfile.'<br>'."\n";
} else {
$listoffiles[$langkey] = $tmpfile;