/**
* Update date mod of the ticket
*
* @since version 0.83.3 new proto
*
* @param $ID ID of the ticket
* @param $no_stat_computation boolean do not cumpute take into account stat (false by default)
* @param $users_id_lastupdater integer to force last_update id (default 0 = not used)
**/
function updateDateMod($ID, $no_stat_computation = false, $users_id_lastupdater = 0)
{
global $DB;
if ($this->getFromDB($ID)) {
if (!$no_stat_computation && (Session::haveRight('task', CommonITILTask::ADDALLITEM) || Session::haveRightsOr('followup', array(TicketFollowup::ADDALLTICKET, TicketFollowup::ADDMYTICKET, TicketFollowup::ADDGROUPTICKET)) || $this->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID()) || isset($_SESSION["glpigroups"]) && $this->haveAGroup(CommonITILActor::ASSIGN, $_SESSION['glpigroups']) || isCommandLine())) {
if ($this->fields['takeintoaccount_delay_stat'] == 0) {
return $this->update(array('id' => $ID, 'takeintoaccount_delay_stat' => $this->computeTakeIntoAccountDelayStat(), '_disablenotif' => true));
}
}
parent::updateDateMod($ID, $no_stat_computation, $users_id_lastupdater);
}
}