From ac1999f59d0b5ace75cc56cc03a80c5fc8e4d3d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Jul 2021 11:08:32 +0200 Subject: [PATCH] FIX #18130 --- htdocs/don/admin/donation.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 9fd6f176c7a..f14fae538ab 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -116,8 +116,10 @@ if ($action == 'set_DONATION_ACCOUNTINGACCOUNT') { if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + $action = ''; // To avoid to execute next actions } else { setEventMessages($langs->trans("Error"), null, 'errors'); + $action = ''; // To avoid to execute next actions } } @@ -132,14 +134,15 @@ if ($action == 'set_DONATION_MESSAGE') { if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + $action = ''; // To avoid to execute next actions } else { setEventMessages($langs->trans("Error"), null, 'errors'); + $action = ''; // To avoid to execute next actions } } -/* - * Action - */ +// Other cases +$reg = array(); if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) {