fixes to delhost

git-svn-id: http://www.observium.org/svn/observer/trunk@2392 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-07-12 21:59:17 +00:00
parent ad39220a6a
commit 29bdc0841c
2 changed files with 3 additions and 3 deletions

View File

@@ -151,8 +151,6 @@ function delete_device($id)
$host = dbFetchCell("SELECT hostname FROM devices WHERE device_id = ?", array($id));
dbDelete('devices', "`device_id` = ?", array($id));
foreach (dbFetch("SELECT * FROM `ports` WHERE `device_id` = ?", array($id)) as $int_data)
{
$int_if = $int_data['ifDescr'];
@@ -160,6 +158,8 @@ function delete_device($id)
delete_port($int_id);
$ret .= "Removed interface $int_id ($int_if)\n";
}
dbDelete('devices', "`device_id` = ?", array($id));
$device_tables = array('entPhysical', 'devices_attribs', 'devices_perms', 'bgpPeers', 'vlans', 'vrfs', 'storage', 'alerts', 'eventlog',
'syslog', 'ports', 'services', 'alerts', 'toner', 'frequency', 'current', 'sensors');