mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes to delhost
git-svn-id: http://www.observium.org/svn/observer/trunk@2392 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user