Ejemplo n.º 1
0
 /**
  * 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));
 }
Ejemplo n.º 2
0
 /**
  * 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")));
 }