function post_deleteFromDB() { global $CFG_GLPI; $itemtype = $this->getItilObjectItemType(); $item = new $itemtype(); $item->getFromDB($this->fields[$item->getForeignKeyField()]); $item->updateActiontime($this->fields[$item->getForeignKeyField()]); $item->updateDateMod($this->fields[$item->getForeignKeyField()]); // Add log entry in the ITIL object $changes[0] = 0; $changes[1] = ''; $changes[2] = $this->fields['id']; Log::history($this->getField($item->getForeignKeyField()), $this->getItilObjectItemType(), $changes, $this->getType(), Log::HISTORY_DELETE_SUBITEM); if ($CFG_GLPI["use_mailing"]) { $options = array('task_id' => $this->fields["id"], 'is_private' => $this->isPrivate(), 'task_users_id' => $this->fields['users_id'], 'task_users_id_tech' => $this->fields['users_id_tech'], 'task_groups_id_tech' => $this->fields['groups_id_tech']); NotificationEvent::raiseEvent('delete_task', $item, $options); } }