From 65b55a79a5c5974826ae246056b3858738f29aab Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Fri, 16 Apr 2021 10:31:18 +0200 Subject: [PATCH 1/4] Update contact.php action 'deletecontact' may have beeen cancelled by triggers. this is not system error --- htdocs/commande/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 5e11c5cb030..447a0862277 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -88,7 +88,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + etEventMessages($object->error, $object->errors, 'errors'); } } /* From 6ea94c6e0c58b485ffafd4ae2dd8a775fae18a98 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Fri, 16 Apr 2021 10:36:24 +0200 Subject: [PATCH 2/4] Update contact.php --- htdocs/fourn/commande/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index d673af33f16..85445c9d4f6 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -89,7 +89,7 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } From bd5c03f1a03254cee03ef2d186493fab776eb25d Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Fri, 16 Apr 2021 11:02:17 +0200 Subject: [PATCH 3/4] Update contact.php --- htdocs/fourn/commande/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 85445c9d4f6..f52aa20d494 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -78,7 +78,7 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'deletecontact' && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { // Deleting a contact From fbf7b21c29e2e221682b722419022da8bbc17268 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Apr 2021 20:15:00 +0200 Subject: [PATCH 4/4] Update contact.php --- htdocs/commande/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 447a0862277..3160c8e289a 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -88,7 +88,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - etEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } /*