From: hickert Date: Mon, 16 Jan 2006 06:46:39 +0000 (+0000) Subject: Some update X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=290bdaa4281b5f1eab4d7dd46d02cc03fb864550;p=gosa.git Some update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2481 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_glpi.inc b/include/class_glpi.inc index 207a9c388..eb8c5fe95 100644 --- a/include/class_glpi.inc +++ b/include/class_glpi.inc @@ -825,12 +825,14 @@ class glpiDB{ } - function removeComputerInformations($id) + function removeComputerInformations($name) { -/* if($this->is_connected){ - $tmp = $this->query("SELECT * FROM glpi_computers WHERE ID=".$id.";"); + $tmp = $this->query("SELECT * FROM glpi_computers WHERE name='".$name."';"); if(isset($tmp[0])){ + $id = $tmp[0]['ID']; + $this->query("DELETE FROM glpi_connect_wire WHERE end2=".$id.";"); + $this->query("DELETE FROM glpi_computer_device WHERE FK_computers=".$id.";"); return($this->query("DELETE FROM glpi_computers WHERE ID=".$id.";")); }else{ echo "can't remove not existing entry"; @@ -840,7 +842,6 @@ class glpiDB{ echo "not connected"; return(false); } -*/ } function is_connected()