Author: Lars Michelsen <[email protected]>
Date: Tue Jan 17 20:06:19 2012 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Tue Jan 17 20:06:19 2012 +0100
Overview page: Better handling of invalid map configuration files
---
ChangeLog | 3 ++-
share/server/core/classes/objects/NagVisMapObj.php | 3 ++-
.../core/classes/objects/NagVisStatefulObject.php | 4 ++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2484aca..2edf741 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,8 @@
Core
* Bugfix: Made upper/lower case rotation_id/backend_id definitions possible
* Added ; and | to allowed signs for urls
- * Undefined backend in single objects doos not prevent whole map loading
anymore
+ * Undefined backend in single objects does not prevent whole map loading
anymore
+ * Overview page: Better handling of invalid map configuration files
Frontend
* Showing dummy shape image when configured shape does not exist
diff --git a/share/server/core/classes/objects/NagVisMapObj.php
b/share/server/core/classes/objects/NagVisMapObj.php
index 514341f..15cde1d 100644
--- a/share/server/core/classes/objects/NagVisMapObj.php
+++ b/share/server/core/classes/objects/NagVisMapObj.php
@@ -499,7 +499,8 @@ class NagVisMapObj extends NagVisStatefulObject {
if($sType == 'map' && $OBJ->isLoopingBacklink)
continue;
- $OBJ->fetchMapObjects($arrMapNames, $depth+1);
+ if(!$OBJ->hasProblem())
+ $OBJ->fetchMapObjects($arrMapNames, $depth+1);
}
}
}
diff --git a/share/server/core/classes/objects/NagVisStatefulObject.php
b/share/server/core/classes/objects/NagVisStatefulObject.php
index fbf4fd4..1a2255d 100644
--- a/share/server/core/classes/objects/NagVisStatefulObject.php
+++ b/share/server/core/classes/objects/NagVisStatefulObject.php
@@ -819,6 +819,10 @@ class NagVisStatefulObject extends NagVisObject {
$this->problem_msg = l('Problem: [MSG]', Array('MSG' => $s));
}
+ public function hasProblem() {
+ return $this->problem_msg !== null;
+ }
+
/**
* PROTECTED fetchSummaryStateFromCounts()
*
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins