Example #1
0
 /**
  * Actions done when item is deleted from the database
  *
  * @return nothing
  **/
 public function cleanDBonPurge()
 {
     $temp = new PluginAccountsAccount_Item();
     $temp->deleteByCriteria(array('plugin_accounts_accounts_id' => $this->fields['id']));
     $ip = new Item_Problem();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ci = new Change_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
 }
 function cleanDBonPurge()
 {
     global $DB;
     $ci = new Computer_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Problem();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ci = new Change_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     Item_Devices::cleanItemDeviceDBOnItemDelete($this->getType(), $this->fields['id'], !empty($this->input['keep_devices']));
 }
Example #3
0
 function cleanDBonPurge()
 {
     $csv = new Computer_SoftwareVersion();
     $csv->cleanDBonItemDelete('Computer', $this->fields['id']);
     $csl = new Computer_SoftwareLicense();
     $csl->cleanDBonItemDelete('Computer', $this->fields['id']);
     $ip = new Item_Problem();
     $ip->cleanDBonItemDelete('Computer', $this->fields['id']);
     $ci = new Change_Item();
     $ci->cleanDBonItemDelete('Computer', $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ci = new Computer_Item();
     $ci->cleanDBonItemDelete('Computer', $this->fields['id']);
     Item_Devices::cleanItemDeviceDBOnItemDelete($this->getType(), $this->fields['id'], !empty($this->input['keep_devices']));
     $disk = new ComputerDisk();
     $disk->cleanDBonItemDelete('Computer', $this->fields['id']);
     $vm = new ComputerVirtualMachine();
     $vm->cleanDBonItemDelete('Computer', $this->fields['id']);
 }
Example #4
0
 function cleanDBonPurge()
 {
     global $DB;
     $ci = new Computer_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $query = "UPDATE `glpi_cartridges`\n                SET `printers_id` = NULL\n                WHERE `printers_id` = '" . $this->fields['id'] . "'";
     $result = $DB->query($query);
     $ip = new Item_Problem();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ci = new Change_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     Item_Devices::cleanItemDeviceDBOnItemDelete($this->getType(), $this->fields['id'], !empty($this->input['keep_devices']));
 }
Example #5
0
 function cleanDBonPurge()
 {
     global $DB;
     $pt = new ProjectTask();
     $pt->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $cp = new Change_Project();
     $cp->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $pt = new ProjectTeam();
     $pt->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     parent::cleanDBonPurge();
 }
Example #6
0
 function cleanDBonPurge()
 {
     global $DB;
     // Delete all licenses
     $query2 = "SELECT `id`\n                 FROM `glpi_softwarelicenses`\n                 WHERE `softwares_id` = '" . $this->fields['id'] . "'";
     if ($result2 = $DB->query($query2)) {
         if ($DB->numrows($result2)) {
             $lic = new SoftwareLicense();
             while ($data = $DB->fetch_assoc($result2)) {
                 $lic->delete(array("id" => $data["id"]));
             }
         }
     }
     $version = new SoftwareVersion();
     $version->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Problem();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ci = new Change_Item();
     $ci->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
     $ip = new Item_Project();
     $ip->cleanDBonItemDelete(__CLASS__, $this->fields['id']);
 }