function cleanDBonPurge() { global $DB; $gu = new Group_User(); $gu->cleanDBonItemDelete($this->getType(), $this->fields['id']); $gt = new Group_Ticket(); $gt->cleanDBonItemDelete($this->getType(), $this->fields['id']); $gp = new Group_Problem(); $gp->cleanDBonItemDelete($this->getType(), $this->fields['id']); $gki = new Group_KnowbaseItem(); $gki->cleanDBonItemDelete($this->getType(), $this->fields['id']); $gr = new Group_Reminder(); $gr->cleanDBonItemDelete($this->getType(), $this->fields['id']); // Ticket rules use various _groups_id_* Rule::cleanForItemAction($this, '_groups_id%'); Rule::cleanForItemCriteria($this, '_groups_id%'); // GROUPS for RuleMailcollector Rule::cleanForItemCriteria($this, 'GROUPS'); // Set no group to consumables $query = "UPDATE `glpi_consumables`\n SET `items_id` = '0'\n WHERE `items_id` = '" . $this->fields['id'] . "'\n AND `itemtype` = 'Group'"; $DB->query($query); }
/** * @see CommonDBTM::cleanDBonPurge() * * @since version 0.83.1 **/ function cleanDBonPurge() { global $DB; $class = new Reminder_User(); $class->cleanDBonItemDelete($this->getType(), $this->fields['id']); $class = new Entity_Reminder(); $class->cleanDBonItemDelete($this->getType(), $this->fields['id']); $class = new Group_Reminder(); $class->cleanDBonItemDelete($this->getType(), $this->fields['id']); $class = new Profile_Reminder(); $class->cleanDBonItemDelete($this->getType(), $this->fields['id']); $class = new PlanningRecall(); $class->cleanDBonItemDelete($this->getType(), $this->fields['id']); }