mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix application auth on per-device basis
git-svn-id: http://www.observium.org/svn/observer/trunk@2751 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -219,6 +219,21 @@ function get_device_id_by_interface_id($interface_id)
|
||||
}
|
||||
}
|
||||
|
||||
function get_device_id_by_app_id($app_id)
|
||||
{
|
||||
if (is_numeric($app_id))
|
||||
{
|
||||
$device_id = dbFetchCell("SELECT `device_id` FROM `applications` WHERE `app_id` = ?", array($app_id));
|
||||
}
|
||||
|
||||
if (is_numeric($device_id))
|
||||
{
|
||||
return $device_id;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
function ifclass($ifOperStatus, $ifAdminStatus)
|
||||
{
|
||||
$ifclass = "interface-upup";
|
||||
|
Reference in New Issue
Block a user