mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactored device types, added power type for APC and MGE stuff + some warning fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@1137 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -52,11 +52,11 @@ function permissions_cache($user_id) {
|
||||
$permissions = array();
|
||||
$query = mysql_query("SELECT * FROM devices_perms WHERE user_id = '".$user_id."'");
|
||||
while($device = mysql_fetch_assoc($query)) {
|
||||
$permissions['device'][$device[device_id]] = 1;
|
||||
$permissions['device'][$device['device_id']] = 1;
|
||||
}
|
||||
$query = mysql_query("SELECT * FROM ports_perms WHERE user_id = '".$user_id."'");
|
||||
while($port = mysql_fetch_assoc($query)) {
|
||||
$permissions['port'][$port[interface_id]] = 1;
|
||||
$permissions['port'][$port['interface_id']] = 1;
|
||||
}
|
||||
return $permissions;
|
||||
}
|
||||
|
Reference in New Issue
Block a user