Module: nagvis Branch: master Commit: 7417b1ff8321d184d77df15fafc638505ade643f URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=7417b1ff8321d184d77df15fafc638505ade643f
Author: Lars Michelsen <[email protected]> Date: Sun Aug 2 20:29:19 2009 +0200 Added code to prevent read of unwanted attributes --- share/nagvis/includes/classes/GlobalMapCfg.php | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/share/nagvis/includes/classes/GlobalMapCfg.php b/share/nagvis/includes/classes/GlobalMapCfg.php index 532634e..4ebaf55 100755 --- a/share/nagvis/includes/classes/GlobalMapCfg.php +++ b/share/nagvis/includes/classes/GlobalMapCfg.php @@ -1252,6 +1252,10 @@ class GlobalMapCfg { $createArray = Array('allowed_user' => 1, 'allowed_for_config' => 1, 'use' => 1); + + // Don't read these keys + $ignoreKeys = Array('object_id' => 0, + 'type' => 0); $l = 0; @@ -1307,10 +1311,12 @@ class GlobalMapCfg { $sKey = trim(substr($file[$l],0,$iDelimPos)); $sValue = trim(substr($file[$l],($iDelimPos+1))); - if(isset($createArray[$sKey])) { - $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = explode(',', $sValue); - } else { - $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = $sValue; + if(isset($ignoreKeys[$sKey])) { + if(isset($createArray[$sKey])) { + $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = explode(',', $sValue); + } else { + $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = $sValue; + } } } } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
