mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-04 00:11:51 +02:00
Honour SysContact-Override
This commit is contained in:
@@ -299,8 +299,12 @@ function GetContacts($results) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( is_numeric($result["device_id"]) ) {
|
if( is_numeric($result["device_id"]) ) {
|
||||||
$tmpa = dbFetchRow("SELECT sysContact FROM devices WHERE device_id = ?",array($result["device_id"]));
|
if( dbFetchCell("SELECT attrib_value FROM devices_attribs WHERE attrib_type = 'override_sysContact_bool' AND device_id = ?",array($result["device_id"])) === "1" ) {
|
||||||
$contacts[$tmpa["sysContact"]] = "NOC";
|
$tmpa = dbFetchCell("SELECT attrib_value FROM devices_attribs WHERE attrib_type = 'override_sysContact_string' AND device_id = ?",array($result["device_id"]));
|
||||||
|
} else {
|
||||||
|
$tmpa = dbFetchCell("SELECT sysContact FROM devices WHERE device_id = ?",array($result["device_id"]));
|
||||||
|
}
|
||||||
|
$contacts[$tmpa] = "NOC";
|
||||||
$tmpa = dbFetchRows("SELECT user_id FROM devices_perms WHERE access_level >= 0 AND device_id = ?", array($result["device_id"]));
|
$tmpa = dbFetchRows("SELECT user_id FROM devices_perms WHERE access_level >= 0 AND device_id = ?", array($result["device_id"]));
|
||||||
foreach( $tmpa as $tmp ) {
|
foreach( $tmpa as $tmp ) {
|
||||||
$uids[$tmp['user_id']] = $tmp['user_id'];
|
$uids[$tmp['user_id']] = $tmp['user_id'];
|
||||||
|
|||||||
Reference in New Issue
Block a user