浏览代码

FIX #18130

Laurent Destailleur 3 年之前
父节点
当前提交
ac1999f59d
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      htdocs/don/admin/donation.php

+ 6 - 3
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) {