Module: nagvis Branch: master Commit: b16985bbfd65dc01662500af5675d024a3d3c426 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=b16985bbfd65dc01662500af5675d024a3d3c426
Author: Lars Michelsen <[email protected]> Date: Thu Sep 23 17:01:30 2010 +0200 Showing configured/inherited boolean values in WUIs context menu correctly now --- share/frontend/wui/classes/WuiMap.php | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/share/frontend/wui/classes/WuiMap.php b/share/frontend/wui/classes/WuiMap.php index e3fc193..8e4e0d0 100644 --- a/share/frontend/wui/classes/WuiMap.php +++ b/share/frontend/wui/classes/WuiMap.php @@ -600,29 +600,27 @@ class WuiMap extends GlobalMap { // Get configured/inherited variables foreach($this->MAPCFG->getValidTypeKeys($obj['type']) AS $key) { - $bGlobal = FALSE; - $value = $this->MAPCFG->getValue($obj['type'], $obj['id'], $key, TRUE); + $bGlobal = false; + $value = $this->MAPCFG->getValue($obj['type'], $obj['id'], $key, true); // Get global value when nothing set - if($value == FALSE) { - $bGlobal = TRUE; - $value = $this->MAPCFG->getValue($obj['type'], $obj['id'], $key, FALSE); + if($value === false) { + $bGlobal = true; + $value = $this->MAPCFG->getValue($obj['type'], $obj['id'], $key, false); } // Change array to comma separated string - if(is_array($value)) { + if(is_array($value)) $value = implode(',',$value); - } // Cleanup some bad signs $value = str_replace('\"','"', $value); $value = str_replace('"','"', $value); - if($bGlobal) { + if($bGlobal) $defaultText .= '<tr class="inherited"><td>'.$key.'</td><td>'.$value.'</td></tr>'; - } else { + else $configuredText .= '<tr><td>'.$key.'</td><td>'.$value.'</td></tr>'; - } } /* ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
