Module: nagvis
Branch: master
Commit: ce7e40529bdb60c277da93e20366033ff7733f91
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=ce7e40529bdb60c277da93e20366033ff7733f91

Author: LaMi <[email protected]>
Date:   Thu Apr  1 01:58:17 2010 +0200

Removed useless type checks (getStateRelevantMembers() call performs those 
checks

---

 share/server/core/classes/objects/NagVisMapObj.php |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/share/server/core/classes/objects/NagVisMapObj.php 
b/share/server/core/classes/objects/NagVisMapObj.php
index 3c4f3ca..1b185eb 100644
--- a/share/server/core/classes/objects/NagVisMapObj.php
+++ b/share/server/core/classes/objects/NagVisMapObj.php
@@ -352,13 +352,9 @@ class NagVisMapObj extends NagVisStatefulObject {
                        $arrStates = Array('UNREACHABLE' => 0, 'CRITICAL' => 
0,'DOWN' => 0,'WARNING' => 0,'UNKNOWN' => 0,'UP' => 0,'OK' => 0,'ERROR' => 
0,'ACK' => 0,'PENDING' => 0);
                        
                        foreach($this->getStateRelevantMembers() AS $OBJ) {
-                               
-                               // Do not get summary information for some 
object types
-                               if($OBJ->getType() != 'shape' && 
$OBJ->getType() != 'textbox') {
-                                       $sState = $OBJ->getSummaryState();
-                                       if(isset($arrStates[$sState])) {
-                                               $arrStates[$sState]++;
-                                       }
+                               $sState = $OBJ->getSummaryState();
+                               if(isset($arrStates[$sState])) {
+                                       $arrStates[$sState]++;
                                }
                        }
                        
@@ -497,10 +493,7 @@ class NagVisMapObj extends NagVisStatefulObject {
                if($this->hasObjects() && $this->hasStatefulObjects()) {
                        // Get summary state member objects
                        foreach($this->getStateRelevantMembers() AS $OBJ) {
-                               // Do not get summary information for some 
object types
-                               if($OBJ->getType() != 'shape' && 
$OBJ->getType() != 'textbox') {
-                                       $this->wrapChildState($OBJ);
-                               }
+                               $this->wrapChildState($OBJ);
                        }
                } else {
                        $this->summary_state = 'UNKNOWN';


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to