done
This commit is contained in:
parent
a8b6dd56a8
commit
2f6e9ea839
@ -45,7 +45,6 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$withproject = GETPOST('withproject', 'int');
|
$withproject = GETPOST('withproject', 'int');
|
||||||
$project_ref = GETPOST('project_ref', 'alpha');
|
$project_ref = GETPOST('project_ref', 'alpha');
|
||||||
$planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('planned_workloadmin', 'int') != '') ? (GETPOST('planned_workloadhour', 'int') > 0 ?GETPOST('planned_workloadhour', 'int') * 3600 : 0) + (GETPOST('planned_workloadmin', 'int') > 0 ?GETPOST('planned_workloadmin', 'int') * 60 : 0) : '');
|
$planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('planned_workloadmin', 'int') != '') ? (GETPOST('planned_workloadhour', 'int') > 0 ?GETPOST('planned_workloadhour', 'int') * 3600 : 0) + (GETPOST('planned_workloadmin', 'int') > 0 ?GETPOST('planned_workloadmin', 'int') * 60 : 0) : '');
|
||||||
$comefromclone = GETPOST("comefromclone", "alpha");
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('projecttaskcard', 'globalcard'));
|
$hookmanager->initHooks(array('projecttaskcard', 'globalcard'));
|
||||||
@ -147,8 +146,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') {
|
|||||||
$newobject->fetch_optionals();
|
$newobject->fetch_optionals();
|
||||||
$newobject->fetch_thirdparty(); // Load new object
|
$newobject->fetch_thirdparty(); // Load new object
|
||||||
$object = $newobject;
|
$object = $newobject;
|
||||||
$action = 'edit';
|
$action = '';
|
||||||
$comefromclone = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,20 +658,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||||
// modified by hook
|
// modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Cancel
|
|
||||||
if ($cancel) {
|
|
||||||
if (GETPOST("comefromclone") == 1) {
|
|
||||||
$result = $object->delete($user);
|
|
||||||
if ($result > 0) {
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
dol_syslog($object->error, LOG_DEBUG);
|
|
||||||
setEventMessages($langs->trans("CantRemoveProject", $langs->transnoentitiesnoconv("ProjectOverview")), null, 'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Modify
|
// Modify
|
||||||
if ($user->rights->projet->creer) {
|
if ($user->rights->projet->creer) {
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&token='.newToken().'&withproject='.((int) $withproject).'">'.$langs->trans('Modify').'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&token='.newToken().'&withproject='.((int) $withproject).'">'.$langs->trans('Modify').'</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user