diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index a419a7d8058..5945d3eac93 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -203,10 +203,13 @@ class ActionComm */ function update() { + $this->label=trim($this->label); + $this->note=trim($this->note); if ($this->percent > 100) $this->percent = 100; $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; $sql.= " SET percent='".$this->percent."'"; + if ($this->label) $sql.= ", label = '".addslashes($this->label)."'"; if ($this->percent == 100) $sql.= ", datea = now()"; if ($this->note) $sql.= ", note = '".addslashes($this->note)."'"; if ($this->contact->id) $sql.= ", fk_contact =". $this->contact->id; diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 66999bdb779..16cd2397411 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -161,9 +161,10 @@ if ($_POST["action"] == 'update') { $action = new Actioncomm($db); $action->fetch($_POST["id"]); - $action->percent = stripslashes($_POST["percent"]); - $action->contact->id = stripslashes($_POST["contactid"]); - $action->note = stripslashes($_POST["note"]); + $action->label = $_POST["label"]; + $action->percent = $_POST["percent"]; + $action->contact->id = $_POST["contactid"]; + $action->note = $_POST["note"]; $action->update(); } @@ -438,7 +439,7 @@ if ($_GET["id"]) print ''; print ''; print ''; - print ''; + print ''; print ''; print '';
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Title").'
'.$langs->trans("Company").''.img_object($langs->trans("ShowCompany"),'company').' '.$act->societe->nom.'