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

Author: Lars Michelsen <[email protected]>
Date:   Wed Oct 20 23:22:46 2010 +0200

submaps to skip were not skipped correctly

---

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

diff --git a/share/server/core/classes/objects/NagVisMapObj.php 
b/share/server/core/classes/objects/NagVisMapObj.php
index a010a73..eda36d9 100644
--- a/share/server/core/classes/objects/NagVisMapObj.php
+++ b/share/server/core/classes/objects/NagVisMapObj.php
@@ -387,7 +387,7 @@ class NagVisMapObj extends NagVisStatefulObject {
                                                        * child for preventing 
a loop
                                                        */
                                                        
if($this->MAPCFG->getName() == $SUBMAPCFG->getName() && $this->isSummaryObject 
== true)
-                                                               continue;
+                                                               continue 2;
 
                                                        /**
                                                        * This occurs when 
someone creates a map icon which links to itself
@@ -405,15 +405,16 @@ class NagVisMapObj extends NagVisStatefulObject {
                                                         */
                                                        
if(isset($arrMapNames[$SUBMAPCFG->getName()]) && ($depth > 3)) {
                                                                
$OBJ->isLoopingBacklink = true;
-                                                               continue;
+                                                               continue 2;
                                                        }
 
                                                        // Store this map in 
the mapNames list
                                                        
$arrMapNames[$SUBMAPCFG->getName()] = true;
                                                        
                                                        // Skip this map when 
the user is not permitted toview this map
-                                                       
if(!$this->isPermitted($OBJ))
-                                                               continue;
+                                                       
if(!$this->isPermitted($OBJ)) {
+                                                               continue 2;
+                                                       }
                                                break;
                                                case 'shape':
                                                        $OBJ = new 
NagVisShape($this->CORE, $objConf['icon']);
@@ -429,7 +430,7 @@ class NagVisMapObj extends NagVisStatefulObject {
                                                        $OBJ = null;
                                                break;
                                        }
-                                       
+
                                        // Apply default configuration to object
                                        $OBJ->setConfiguration($objConf);
                                        
@@ -498,7 +499,6 @@ class NagVisMapObj extends NagVisStatefulObject {
         * @author      Lars Michelsen <[email protected]>
         */
        private function isPermitted($OBJ) {
-               // Check for valid permissions
                if($this->CORE->getAuthorization() !== null && 
$this->CORE->getAuthorization()->isPermitted('Map', 'view', $OBJ->getName()))
                        return true;
                else {


------------------------------------------------------------------------------
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

Reply via email to