pre_updateInDB() public method

public pre_updateInDB ( )
Example #1
0
 function pre_updateInDB()
 {
     // takeintoaccount :
     //     - update done by someone who have update right
     //       see also updatedatemod used by ticketfollowup updates
     if ($this->fields['takeintoaccount_delay_stat'] == 0 && (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']))) {
         $this->updates[] = "takeintoaccount_delay_stat";
         $this->fields['takeintoaccount_delay_stat'] = $this->computeTakeIntoAccountDelayStat();
     }
     parent::pre_updateInDB();
 }
Example #2
0
 function pre_updateInDB()
 {
     parent::pre_updateInDB();
 }
Example #3
0
 function pre_updateInDB()
 {
     // takeintoaccount :
     //     - update done by someone who have update right
     //       see also updatedatemod used by ticketfollowup updates
     if ($this->fields['takeintoaccount_delay_stat'] == 0 && (Session::haveRight("global_add_tasks", "1") || Session::haveRight("global_add_followups", "1") || $this->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID()) || isset($_SESSION["glpigroups"]) && $this->haveAGroup(CommonITILActor::ASSIGN, $_SESSION['glpigroups']))) {
         $this->updates[] = "takeintoaccount_delay_stat";
         $this->fields['takeintoaccount_delay_stat'] = $this->computeTakeIntoAccountDelayStat();
     }
     parent::pre_updateInDB();
 }