mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Include shortname in all cases
This commit is contained in:
@ -1189,10 +1189,13 @@ function load_mibdefs($module, $name)
|
||||
|
||||
// add shortname to each element
|
||||
$prefix = longest_matching_prefix($name, $object_types);
|
||||
if (strlen($prefix) > 2) {
|
||||
foreach ($result as $mib => $m) {
|
||||
foreach ($result as $mib => $m) {
|
||||
if (strlen($prefix) > 2) {
|
||||
$result[$mib]['shortname'] = preg_replace("/^$prefix/", '', $m['object_type'], 1);
|
||||
}
|
||||
else {
|
||||
$result[$mib]['shortname'] = $m['object_type'];
|
||||
}
|
||||
}
|
||||
|
||||
d_print_r($result);
|
||||
|
Reference in New Issue
Block a user