From 80ca1e8cf3eb1179f9b0d4d5639d4c13f1d7e3d0 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 28 Apr 2011 13:08:13 +0000 Subject: [PATCH] quicker os/group parsing (from lenwe) git-svn-id: http://www.observium.org/svn/observer/trunk@2193 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/static-config.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/includes/static-config.php b/includes/static-config.php index 12227170f1..3689323b44 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -713,14 +713,16 @@ $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])) - { - foreach ($config['os_group'][$this_os_group] as $property => $value) + if (isset($config['os'][$this_os]['group'])){ + $this_os_group = $config['os'][$this_os]['group']; + if (isset($config['os_group'][$this_os_group])) { - if (!isset($config['os'][$this_os][$property])) + foreach ($config['os_group'][$this_os_group] as $property => $value) { - $config['os'][$this_os][$property] = $value; + if (!isset($config['os'][$this_os][$property])) + { + $config['os'][$this_os][$property] = $value; + } } } }