diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 9251b5e7ac9..db662b6d9e4 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -92,7 +92,7 @@ if ($action == 'initbarcodeproducts') if (! is_object($modBarCodeProduct)) { $error++; - setEventMessage($langs->trans("NoBarcodeNumberingTemplateDefined"),'errors'); + setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors'); } if (! $error) @@ -109,7 +109,7 @@ if ($action == 'initbarcodeproducts') $resql=$db->query($sql); if ($resql) { - setEventMessage($langs->trans("AllBarcodeReset"),'mesgs'); + setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); } else { @@ -160,7 +160,7 @@ if ($action == 'initbarcodeproducts') if (! $error) { - setEventMessage($langs->trans("RecordsModified",$nbok),'mesgs'); + setEventMessages($langs->trans("RecordsModified",$nbok), null, 'mesgs'); } } diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index f974bbec897..5cd45467f01 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -68,7 +68,7 @@ if (GETPOST('submitproduct') && GETPOST('submitproduct')) if (empty($forbarcode) || empty($fk_barcode_type)) { - setEventMessage($langs->trans("DefinitionOfBarCodeForProductNotComplete",$producttmp->getNomUrl()), 'warnings'); + setEventMessages($langs->trans("DefinitionOfBarCodeForProductNotComplete",$producttmp->getNomUrl()), null, 'warnings'); } } } @@ -85,7 +85,7 @@ if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) if (empty($forbarcode) || empty($fk_barcode_type)) { - setEventMessage($langs->trans("DefinitionOfBarCodeForProductNotComplete",$thirdpartytmp->getNomUrl()), 'warnings'); + setEventMessages($langs->trans("DefinitionOfBarCodeForProductNotComplete",$thirdpartytmp->getNomUrl()), null, 'warnings'); } } } @@ -114,7 +114,7 @@ if ($action == 'builddoc') if ($result <= 0) { $error++; - setEventMessage('Failed to get bar code type information '.$stdobject->error, 'errors'); + setEventMessages('Failed to get bar code type information '.$stdobject->error, $stdobject->errors, 'errors'); } } @@ -158,13 +158,13 @@ if ($action == 'builddoc') if ($result <= 0 || ! dol_is_file($barcodeimage)) { $error++; - setEventMessage('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), 'errors'); + setEventMessages('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), null, 'errors'); } } else { $error++; - setEventMessage("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, 'errors'); + setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors'); } } else { $template = 'tcpdflabel'; diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 05691a227b7..bd249055773 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -42,12 +42,12 @@ if ($action == 'setvalue') if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 33a0f383fde..daacc4ca4da 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -78,12 +78,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), null, 'errors'); } if (! $url) { $error++; - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), null, 'errors'); } if (! $error) @@ -104,11 +104,11 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings'); } else { - setEventMessage($bookmark->error, 'errors'); + setEventMessages($bookmark->error, $bookmark->errors, 'errors'); } $action = $invertedaction; } diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index f8b7c21863d..425ae0079b6 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -60,7 +60,7 @@ if ($_GET["action"] == 'delete') } else { - setEventMessage($bookmark->error, 'errors'); + setEventMessages($bookmark->error, $bookmark->errors, 'errors'); } }