quicker os/group parsing (from lenwe)

git-svn-id: http://www.observium.org/svn/observer/trunk@2193 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-28 13:08:13 +00:00
parent 04f5389e77
commit 80ca1e8cf3

View File

@@ -713,8 +713,9 @@ $config['os'][$os]['icon'] = "tripplite";
foreach($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group'])) { $this_os_group = $config['os'][$this_os]['group']; }
if (isset($config['os'][$this_os]['group']) && isset($config['os_group'][$this_os_group]))
if (isset($config['os'][$this_os]['group'])){
$this_os_group = $config['os'][$this_os]['group'];
if (isset($config['os_group'][$this_os_group]))
{
foreach ($config['os_group'][$this_os_group] as $property => $value)
{
@@ -725,6 +726,7 @@ foreach($config['os'] as $this_os => $blah)
}
}
}
}
$device_types = array('server', 'network', 'firewall', 'workstation', 'printer', 'power', 'environment');