mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Added api call to delete device
This commit is contained in:
@@ -940,4 +940,26 @@ function validate_device_id($id)
|
||||
}
|
||||
return($return);
|
||||
}
|
||||
|
||||
function get_device_id($hostname)
|
||||
{
|
||||
global $config;
|
||||
if(empty($hostname))
|
||||
{
|
||||
$return = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$device_id = dbFetchCell("SELECT `device_id` FROM `devices` WHERE `hostname` = ?", array($hostname));
|
||||
if(empty($device_id))
|
||||
{
|
||||
$return = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = $device_id;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user