Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
8c3a7cfb60
@ -53,6 +53,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected i
|
|||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
$mode = GETPOST('mode', 'alpha');
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$projectid = GETPOST('projectid', 'int');
|
$projectid = GETPOST('projectid', 'int');
|
||||||
@ -316,10 +317,10 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_deleteline' && $confirm == "yes" && $user->rights->projet->supprimer) {
|
if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
|
||||||
$object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_id
|
$object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_id
|
||||||
|
|
||||||
if (in_array($object->timespent_fk_user, $childids) || $user->rights->projet->all->creer) {
|
if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
|
||||||
$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
|
$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -1897,7 +1898,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
} elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks
|
} elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks
|
||||||
if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
|
if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
|
||||||
if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
|
if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user