diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 0a57508c271c5..fbaf68a96d97e 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -162,7 +162,7 @@ { $filebis=$reg[1]; - // Chargement de la classe de codage + // Loading encoding class require_once $newdir.$file; $classname = "mod".ucfirst($filebis); $module = new $classname($db); diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 46ca2b9fd870d..b3f1d7a5d5160 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -344,7 +344,7 @@ $classname = preg_replace('/\-.*$/','',$classname); if (! class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/',$filebis) || preg_match('/mod_/',$classname)) && substr($filebis, dol_strlen($filebis)-3, 3) == 'php') { - // Chargement de la classe de numerotation + // Charging the numbering class require_once $dir.$filebis; $module = new $classname($db); diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index c9bf610bd1ba2..07113231bcc22 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -130,7 +130,7 @@ $classname = preg_replace('/\-.*$/','',$classname); if (! class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/',$filebis) || preg_match('/mod_/',$classname)) && substr($filebis, dol_strlen($filebis)-3, 3) == 'php') { - // Chargement de la classe de numerotation + // Charging the numbering class require_once $dir.$filebis; $module = new $classname($db); diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index a409d0c8b3f7b..ea81e63305e58 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -221,7 +221,7 @@ { if (preg_match('/(modGeneratePass[a-z]+)\.class\.php/i',$file,$reg)) { - // Chargement de la classe de numerotation + // Charging the numbering class $classname = $reg[1]; require_once $dir.'/'.$file; diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 0a13c3e7fab0f..9ffd7ac640100 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -101,12 +101,12 @@ } else { - setEventMessage($categorie->error, 'errors'); + setEventMessages($categorie->error, $categorie->errors, 'errors'); } } else { - setEventMessage($categorie->error, 'errors'); + setEventMessages($categorie->error, $categorie->errors, 'errors'); } } diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 94570d48f3e10..98f02c7a7428a 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -95,7 +95,7 @@ else { $action = 'add'; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -128,7 +128,7 @@ else { $action = 'edit'; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index bf86c1d496c30..39f8d62fb7b6e 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -122,7 +122,7 @@ } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -137,13 +137,13 @@ $result=$object->add_type($newobject,$elementtype); if ($result >= 0) { - setEventMessage($langs->trans("WasAddedSuccessfully",$newobject->ref)); + setEventMessages($langs->trans("WasAddedSuccessfully",$newobject->ref), null, 'mesgs'); } else { if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessage($langs->trans("ObjectAlreadyLinkedToCategory"),'warnings'); + setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); } else { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 24eb117684f2f..066df5fb39e01 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -62,7 +62,7 @@ $result=$cat->write_file(GETPOST('id','int')); if ($result < 0) { - setEventMessage($cat->error, 'errors'); + setEventMessages($cat->error, $cat->errors, 'errors'); } } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 2ff7796bfaed9..2a892033865ce 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -117,7 +117,7 @@ { if (empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { @@ -129,7 +129,7 @@ } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } $action=''; @@ -141,14 +141,14 @@ if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) { // As security measure, we don't allow send from the GUI - setEventMessage($langs->trans("MailingNeedCommand"), 'warnings'); - setEventMessage('', 'warnings'); - setEventMessage($langs->trans("MailingNeedCommand2"), 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings'); + setEventMessages('', null, 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $action=''; } else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { - setEventMessage($langs->trans("NotEnoughPermissions"), 'warnings'); + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action=''; } else @@ -351,27 +351,27 @@ } else { - setEventMessage($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo")); + setEventMessages($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo"), null, 'mesgs'); } // Loop finished, set global statut of mail if ($nbko > 0) { $statut=2; // Status 'sent partially' (because at least one error) - if ($nbok > 0) setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); - else setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + if ($nbok > 0) setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); + else setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } else { if ($nbok >= $num) { $statut=3; // Send to everybody - setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } else { $statut=2; // Status 'sent partially' (because not send to everybody) - setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } } @@ -443,11 +443,11 @@ $result=$mailfile->sendfile(); if ($result) { - setEventMessage($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($object->email_from,2),$mailfile->getValidAddress($object->sendto,2))); + setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($object->email_from,2),$mailfile->getValidAddress($object->sendto,2)), null, 'mesgs'); } else { - setEventMessage($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, 'errors'); + setEventMessages($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, null, 'errors'); } $action=''; @@ -488,7 +488,7 @@ $mesgs[] = $object->error; } - setEventMessage($mesgs, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action="create"; } @@ -518,7 +518,7 @@ $mesg = $object->error; } - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action=""; } @@ -582,7 +582,7 @@ $mesgs[] =$object->error; } - setEventMessage($mesgs, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action="edit"; } else @@ -597,7 +597,7 @@ if ($object->id > 0) { $object->valid($user); - setEventMessage($langs->trans("MailingSuccessfullyValidated")); + setEventMessages($langs->trans("MailingSuccessfullyValidated"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -628,7 +628,7 @@ } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -764,18 +764,18 @@ // You ensure that every user is using its own SMTP server. $linktoadminemailbefore=''; $linktoadminemailend=''; - setEventMessage($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), 'warnings'); - setEventMessage($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), 'warnings'); - if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessage($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), 'warnings'); + setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings'); + setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings'); + if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings'); $_GET["action"]=''; } else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) { // Pour des raisons de securite, on ne permet pas cette fonction via l'IHM, // on affiche donc juste un message - setEventMessage($langs->trans("MailingNeedCommand"), 'warnings'); - setEventMessage('', 'warnings'); - setEventMessage($langs->trans("MailingNeedCommand2"), 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings'); + setEventMessages('', null, 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $_GET["action"]=''; } else diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index cd3ff7b00ee13..ad4e3210619a8 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -80,7 +80,7 @@ //print $dir."\n
"; dol_syslog("Scan directory ".$dir." for modules"); - // Chargement de la classe + // Loading Class $file = $dir."/".$module.".modules.php"; $classname = "mailing_".$module; @@ -100,24 +100,24 @@ } if ($result > 0) { - setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs'); + setEventMessages($langs->trans("XTargetsAdded",$result), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } if ($result == 0) { - setEventMessage($langs->trans("WarningNoEMailsAdded"),'warnings'); + setEventMessages($langs->trans("WarningNoEMailsAdded"), null, 'warnings'); } if ($result < 0) { - setEventMessage($langs->trans("Error").($obj->error?' '.$obj->error:''),'errors'); + setEventMessages($langs->trans("Error").($obj->error?' '.$obj->error:''), null, 'errors'); } } if (GETPOST('clearlist')) { - // Chargement de la classe + // Loading Class $obj = new MailingTargets($db); $obj->clear_target($id); @@ -267,7 +267,7 @@ // Loop on each submodule foreach($modulenames as $modulename) { - // Chargement de la classe + // Loading Class $file = $dir.$modulename.".modules.php"; $classname = "mailing_".$modulename; require_once $file; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 59753ee1904ae..5904bec00098c 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -83,7 +83,7 @@ $modulename=$reg[1]; if ($modulename == 'example') continue; - // Chargement de la classe + // Loading Class $file = $dir."/".$modulename.".modules.php"; $classname = "mailing_".$modulename; require_once $file; diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php index 113f35299cab6..ee1c3b8e96c3b 100644 --- a/htdocs/core/modules/export/modules_export.php +++ b/htdocs/core/modules/export/modules_export.php @@ -64,7 +64,7 @@ function liste_modeles($db,$maxfilenamelength=0) { $moduleid=$reg[1]; - // Chargement de la classe + // Loading Class $file = $dir."/export_".$moduleid.".modules.php"; $classname = "Export".ucfirst($moduleid); diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 4fa5052a90a49..a27b0fd942689 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -84,7 +84,7 @@ function liste_modeles($db,$maxfilenamelength=0) { $moduleid=$reg[1]; - // Chargement de la classe + // Loading Class $file = $dir."/import_".$moduleid.".modules.php"; $classname = "Import".ucfirst($moduleid); diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 88e4ecc859653..3a3436c71a981 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -107,7 +107,7 @@ function load_arrays($user,$filter='') if ($enabled) { - // Chargement de la classe + // Loading Class $file = $dir.$modulename.".class.php"; $classname = $modulename; require_once $file;