diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 3e28ea3e4ef..3d572d9fcbb 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -152,12 +152,9 @@ class InterfaceTicketEmail extends DolibarrTriggers } include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1); - if ($mailfile->error) - { + if ($mailfile->error) { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); - } - else - { + } else { $result = $mailfile->sendfile(); } if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index bab095fe6fa..6dd13b4cb7d 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -350,9 +350,7 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else - { + } else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error ++; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index aefd04914ad..e8046aa9bd8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1160,9 +1160,7 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else - { + } else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error ++; } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index e68730acf64..75bed6b0163 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -464,9 +464,7 @@ if (empty($reshook)) $sql .= " WHERE rowid = " . $rowid; $result = $db->query($sql); - } - else - { + } else { setEventMessages(('delete_price_by_qty'.$langs->transnoentities(MissingIds)), null,'errors'); } } @@ -479,9 +477,7 @@ if (empty($reshook)) $sql .= " WHERE fk_product_price = " . $priceid; $result = $db->query($sql); - } - else - { + } else { setEventMessages(('delete_price_by_qty'.$langs->transnoentities(MissingIds)), null,'errors'); } } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 1fde15c5b29..b9fbfdb5979 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1614,12 +1614,9 @@ class Ticket extends CommonObject } include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject, $info_sendto['email'], $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0); - if ($mailfile->error || $mailfile->errors) - { + if ($mailfile->error || $mailfile->errors) { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); - } - else - { + } else { $result = $mailfile->sendfile(); if ($result > 0) { $nb_sent++;