diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 031239f1a85..2266f012964 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -165,7 +165,7 @@ if (empty($reshook)) else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), null, 'errors'); + setEventMessages($langs->trans($object->error), null, 'errors'); $error++; } @@ -204,13 +204,13 @@ if (empty($reshook)) if (empty($ref)) { $error++; - //$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet + //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); } if (empty($_POST["title"])) { $error++; - //$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet + //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 5af112ebfa0..33bd1ba1373 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -122,7 +122,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $num_rows = $db->num_rows($resql); if ($num_rows > 0) { - setEventMessage($langs->trans("VoteNameAlreadyExists"),'errors'); + setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors'); $error++; } else @@ -181,7 +181,7 @@ for ($i=0; $i<$nblignes; $i++) $testligneamodifier=true; } - //test pour voir si une ligne est a modifier + //test to see if a line is to be modified if (isset($_POST['validermodifier'.$i])) { $modifier=$i; @@ -293,11 +293,11 @@ print '
| '."\n"; - //affichage des années + //display of years $colspan=1; $nbofsujet=count($toutsujet); for ($i=0;$i<$nbofsujet;$i++) @@ -314,7 +314,7 @@ if ($object->format=="D") print ' |
| '."\n"; - //affichage des mois + //display of months $colspan=1; for ($i=0;$i<$nbofsujet;$i++) { $cur = intval($toutsujet[$i]); // intval() est utiliser pour supprimer le suffixe @* qui déplaît logiquement à strftime() @@ -337,7 +337,7 @@ if ($object->format=="D") print ' |
| '."\n"; - //affichage des jours + //display of days $colspan=1; for ($i=0;$i<$nbofsujet;$i++) { $cur = intval($toutsujet[$i]); @@ -356,7 +356,7 @@ if ($object->format=="D") print ' |
| '."\n"; @@ -375,7 +375,7 @@ if ($object->format=="D") } else { - //affichage des sujets du sondage + //display of survey topics print ' |
| '."\n"; diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index f509bc82759..679ef545442 100644 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -74,7 +74,7 @@ if ($action == 'confirm_add_resource') if (empty($ref)) { $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")); - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); $error++; } @@ -90,14 +90,14 @@ if ($action == 'confirm_add_resource') { // Creation OK $db->commit(); - setEventMessage($langs->trans('ResourceCreatedWithSuccess')); + setEventMessages($langs->trans('ResourceCreatedWithSuccess'), null, 'mesgs'); Header("Location: card.php?id=" . $object->id); return; } else { // Creation KO - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 4e22175d21e..31fb6a955b1 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -96,14 +96,14 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='edit'; } } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='edit'; } } @@ -122,17 +122,18 @@ if (empty($reshook)) if ($result >= 0) { - setEventMessage($langs->trans('RessourceSuccessfullyDeleted')); + setEventMessages($langs->trans('RessourceSuccessfullyDeleted'), null, 'mesgs'); Header('Location: '.DOL_URL_ROOT.'/resource/list.php'); exit; } - else { - setEventMessage($object->error,'errors'); + else + { + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 21dad5afa05..77c23d5f8b4 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -93,7 +93,7 @@ if ($action == 'add_element_resource' && ! $cancel) } if (! $error && $res > 0) { - setEventMessage($langs->trans('ResourceLinkedWithSuccess'),'mesgs'); + setEventMessages($langs->trans('ResourceLinkedWithSuccess'), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$element_id); exit; } @@ -112,12 +112,13 @@ if ($action == 'update_linked_resource' && $user->rights->resource->write && !GE if ($result >= 0) { - setEventMessage($langs->trans('RessourceLineSuccessfullyUpdated')); + setEventMessages($langs->trans('RessourceLineSuccessfullyUpdated'), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); exit; } - else { - setEventMessage($object->error,'errors'); + else + { + setEventMessages($object->error, $object->errors, 'errors'); } } } diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 0318caa665b..e69d098ea7d 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -77,11 +77,11 @@ if ($action == 'updateoptions') if (! $res > 0) $error++; if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -92,11 +92,11 @@ if ($action == 'updateoptions') if (! $res > 0) $error++; if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } } @@ -121,12 +121,12 @@ if ($action == 'setModuleOptions') 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'); } } @@ -217,11 +217,11 @@ if ($action=="setaddrefinlist") { if (! $res > 0) $error++; if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 0b373ba9d5d..fcee0c2cdf7 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -468,7 +468,7 @@ if ($resql) // Show delete result message if (GETPOST('delsoc')) { - setEventMessage($langs->trans("CompanyDeleted",GETPOST('delsoc'))); + setEventMessages($langs->trans("CompanyDeleted",GETPOST('delsoc')), null, 'mesgs'); } $langs->load("other"); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 6341f1dd37e..6e8d7af4929 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -69,10 +69,13 @@ if ($action == 'add_customer_price_confirm' && ! $_POST ["cancel"] && ($user->ri $result = $prodcustprice->create($user, 0, $update_child_soc); - if ($result < 0) { - setEventMessage($prodcustprice->error, 'errors'); - } else { - setEventMessage($langs->trans('Save'), 'mesgs'); + if ($result < 0) + { + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); + } + else + { + setEventMessages($langs->trans('Save'), null, 'mesgs'); } $action = ''; @@ -83,10 +86,13 @@ if ($action == 'delete_customer_price' && ($user->rights->produit->creer || $use $prodcustprice->id = GETPOST('lineid'); $result = $prodcustprice->delete($user); - if ($result < 0) { - setEventMessage($prodcustprice->error, 'mesgs'); - } else { - setEventMessage($langs->trans('Delete'), 'errors'); + if ($result < 0) + { + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); + } + else + { + setEventMessages($langs->trans('Delete'), null, 'mesgs'); } $action = ''; } @@ -105,10 +111,13 @@ if ($action == 'update_customer_price_confirm' && ! $_POST ["cancel"] && ($user- $prodcustprice->recuperableonly = (preg_match('/\*/', GETPOST("tva_tx")) ? 1 : 0); $result = $prodcustprice->update($user, 0, $update_child_soc); - if ($result < 0) { - setEventMessage($prodcustprice->error, 'errors'); - } else { - setEventMessage($langs->trans('Save'), 'mesgs'); + if ($result < 0) + { + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); + } + else + { + setEventMessages($langs->trans('Save'), null, 'mesgs'); } $action = ''; @@ -284,8 +293,9 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print load_fiche_titre($langs->trans('PriceByCustomer')); $result = $prodcustprice->fetch(GETPOST('lineid', 'int')); - if ($result < 0) { - setEventMessage($prodcustprice->error, 'errors'); + if ($result < 0) + { + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } print ' |