From a169e64e8d6833cb7a51d1cc2e134f1446ead1f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jul 2005 02:12:13 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Corrige=20nombreux=20probl=E8mes=20sur?= =?UTF-8?q?=20enregistrements=20incomplets=20des=20actions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/action/fiche.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 30be162e445..2312878441f 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -80,6 +80,20 @@ if ($_POST["action"] == 'add_action') $actioncomm->type_code = $cactioncomm->code; $actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0; $actioncomm->label = $_POST["label"]; + if (! $_POST["label"]) + { + if ($_POST["actionid"] == 5 && $contact->fullname) + { + $actioncomm->label = $langs->trans("TaskRDVWith",$contact->fullname); + } + else + { + if ($langs->trans("Action".$actioncomm->type_code) != "Action".$actioncomm->type_code) + { + $actioncomm->label = $langs->trans("Action".$actioncomm->type_code)."\n"; + } + } + } $actioncomm->date = mktime($_POST["heurehour"], $_POST["heuremin"], 0, @@ -119,7 +133,7 @@ if ($_POST["action"] == 'add_action') if ($_POST["actionid"] == 5 && $contact->fullname) { $libellecal =$langs->trans("TaskRDVWith",$contact->fullname)."\n"; - $libellecal.=$actioncomm->label; + $libellecal.=$_POST["label"]; } else { @@ -128,7 +142,7 @@ if ($_POST["action"] == 'add_action') { $libellecal.=$langs->trans("Action".$actioncomm->type_code)."\n"; } - $libellecal.=$actioncomm->label; + $libellecal.=$_POST["label"]; } $webcal->date=$actioncomm->date;