From 4791ff7730eb2a948c1a95f6aa2495f6dac25b87 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 31 Jul 2006 14:27:59 +0000 Subject: [PATCH] Avoid comment duplication when reloading the page git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@747 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/validations.inc.php | 8 +++++++- templates/admin/valider.tpl | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/validations.inc.php b/include/validations.inc.php index 9de580f..514776e 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -158,7 +158,13 @@ class Validate // ajout d'un commentaire if (Env::has('hold') && Env::has('comm')) { - $this->comments[] = Array(S::v('bestalias'), Env::v('comm')); + $formid = Env::i('formid'); + foreach ($this->comments as $comment) { + if ($comment[2] === $formid) { + return true; + } + } + $this->comments[] = Array(S::v('bestalias'), Env::v('comm'), $formid); // envoi d'un mail à hotliners global $globals; diff --git a/templates/admin/valider.tpl b/templates/admin/valider.tpl index 3e748f1..7dbd1eb 100644 --- a/templates/admin/valider.tpl +++ b/templates/admin/valider.tpl @@ -66,6 +66,7 @@ +
-- 2.1.4