diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index e92dacc5dc9..772e3e05622 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -68,7 +68,7 @@ $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions| if ($user->societe_id && $socid) $result = restrictedArea($user,'societe',$socid); $error=GETPOST("error"); -$donotclearsession=0; +$donotclearsession=GETPOST('donotclearsession')?GETPOST('donotclearsession'):0; $cactioncomm = new CActionComm($db); $object = new ActionComm($db); @@ -358,22 +358,22 @@ if ($action == 'update') $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); $object->fk_action = dol_getIdFromCode($db, $_POST["actioncode"], 'c_actioncomm'); - $object->label = $_POST["label"]; + $object->label = GETPOST("label"); $object->datep = $datep; $object->datef = $datef; $object->percentage = $percentage; - $object->priority = $_POST["priority"]; - $object->fulldayevent= $_POST["fullday"]?1:0; + $object->priority = GETPOST("priority"); + $object->fulldayevent= GETPOST("fullday")?1:0; $object->location = GETPOST('location'); - $object->socid = $_POST["socid"]; - $object->contactid = $_POST["contactid"]; + $object->socid = GETPOST("socid"); + $object->contactid = GETPOST("contactid"); //$object->societe->id = $_POST["socid"]; // deprecated //$object->contact->id = $_POST["contactid"]; // deprecated - $object->fk_project = $_POST["projectid"]; - $object->note = $_POST["note"]; - $object->pnote = $_POST["note"]; - $object->fk_element = $_POST["fk_element"]; - $object->elementtype = $_POST["elementtype"]; + $object->fk_project = GETPOST("projectid"); + $object->note = GETPOST("note"); + $object->pnote = GETPOST("note"); + $object->fk_element = GETPOST("fk_element"); + $object->elementtype = GETPOST("elementtype"); if (! $datef && $percentage == 100) { @@ -603,6 +603,7 @@ if ($action == 'create') print '