Fix POST moved into GETPOST
This commit is contained in:
parent
24ee3ac0fa
commit
57bb6506a3
@ -649,6 +649,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).
|
||||
$filteronthirdpartyid = $socid;
|
||||
$tasksarray = $taskstatic->getTasksArray(0, 0, $object->id, $filteronthirdpartyid, 0, '', -1, $morewherefilter, 0, 0, $extrafields, 1, $search_array_options);
|
||||
|
||||
// We load also tasks limited to a particular user
|
||||
$tmpuser = new User($db);
|
||||
if ($search_user_id > 0) $tmpuser->fetch($search_user_id);
|
||||
|
||||
@ -93,13 +93,13 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer)
|
||||
if (empty($task_parent)) $task_parent = 0; // If task_parent is ''
|
||||
|
||||
$object->ref = $taskref ? $taskref : GETPOST("ref", 'alpha', 2);
|
||||
$object->label = $_POST["label"];
|
||||
$object->description = $_POST['description'];
|
||||
$object->label = GETPOST("label", "alphanohtml");
|
||||
$object->description = GETPOST('description', "alphanohtml");
|
||||
$object->fk_task_parent = $task_parent;
|
||||
$object->planned_workload = $planned_workload;
|
||||
$object->date_start = dol_mktime($_POST['dateohour'], $_POST['dateomin'], 0, $_POST['dateomonth'], $_POST['dateoday'], $_POST['dateoyear']);
|
||||
$object->date_end = dol_mktime($_POST['dateehour'], $_POST['dateemin'], 0, $_POST['dateemonth'], $_POST['dateeday'], $_POST['dateeyear']);
|
||||
$object->progress = $_POST['progress'];
|
||||
$object->date_start = dol_mktime(GETPOST('dateohour', 'int'), GETPOST('dateomin', 'int'), 0, GETPOST('dateomonth', 'int'), GETPOST('dateoday', 'int'), GETPOST('dateoyear', 'int'));
|
||||
$object->date_end = dol_mktime(GETPOST('dateehour', 'int'), GETPOST('dateemin', 'int'), 0, GETPOST('dateemonth', 'int'), GETPOST('dateeday', 'int'), GETPOST('dateeyear', 'int'));
|
||||
$object->progress = price2num(GETPOST('progress', 'alphanohtml'));
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
@ -182,7 +182,7 @@ if ($action == 'remove_file' && $user->rights->projet->creer)
|
||||
{
|
||||
$langs->load("other");
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
$file = $upload_dir.'/'.GETPOST('file');
|
||||
$file = $upload_dir.'/'.dol_sanitizeFileName(GETPOST('file'));
|
||||
|
||||
$ret = dol_delete_file($file);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
||||
@ -190,11 +190,11 @@ if ($action == 'remove_file' && $user->rights->projet->creer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
|
||||
llxHeader('', $langs->trans("Task"));
|
||||
|
||||
$form = new Form($db);
|
||||
@ -214,7 +214,7 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
$object->project = clone $projectstatic;
|
||||
|
||||
$userWrite = $projectstatic->restrictedProjectArea($user, 'write');
|
||||
//$userWrite = $projectstatic->restrictedProjectArea($user, 'write');
|
||||
|
||||
if (!empty($withproject))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user