/** * Function to uninstall an object * * @param $computers_id the computer's ID in GLPI * * @return nothing **/ static function deleteOcsLink($computers_id) { $link = new PluginOcsinventoryngOcslink(); $link->dohistory = false; $link->deleteByCriteria(array('computers_id' => $computers_id)); $reg = new PluginOcsinventoryngRegistryKey(); $reg->deleteByCriteria(array('computers_id' => $computers_id)); }
/** * if Computer deleted * * @param $comp Computer object **/ static function purgeComputer(Computer $comp) { $link = new self(); $link->deleteByCriteria(array('computers_id' => $comp->getField("id"))); $reg = new PluginOcsinventoryngRegistryKey(); $reg->deleteByCriteria(array('computers_id' => $comp->getField("id"))); }