Author: Lars Michelsen <[email protected]>
Date: Wed Dec 19 15:26:25 2012 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Wed Dec 19 15:26:25 2012 +0100
Bugfix: Multisite module is catching single map errors now and show all
maps in the list regardless of the error. Maps with errors will be listed
as UNKNOWN (orange) in the multisite snapin
---
ChangeLog | 3 +++
share/server/core/classes/CoreModMultisite.php | 11 +++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d83a2fe..5f7e843 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ Frontend:
* Bugfix: Fixed flickering hover menu on overview page when sidebar opened
* Bugfix: Fixed background positioning on browser zoomed maps
* Bugfix: Fixed javascript error when rotations are disabled
+ * Bugfix: Multisite module is catching single map errors now and show all
+ maps in the list regardless of the error. Maps with errors will be listed
+ as UNKNOWN (orange) in the multisite snapin
Geomap:
* New option source_type to configure a csv file or the used backend as
diff --git a/share/server/core/classes/CoreModMultisite.php
b/share/server/core/classes/CoreModMultisite.php
index aa6d0f3..e3f5a8a 100644
--- a/share/server/core/classes/CoreModMultisite.php
+++ b/share/server/core/classes/CoreModMultisite.php
@@ -84,6 +84,9 @@ class CoreModMultisite extends CoreModule {
} catch(MapCfgInvalid $e) {
$map['configError'] = true;
$map['configErrorMsg'] = $e->getMessage();
+ } catch(Exception $e) {
+ $map['error'] = true;
+ $map['errorMsg'] = $e->getMessage();
}
if($MAPCFG->getValue(0, 'show_in_lists') != 1 ||
$MAPCFG->getValue(0, 'show_in_multisite') != 1)
@@ -112,6 +115,14 @@ class CoreModMultisite extends CoreModule {
$MAP->MAPOBJ->clearMembers();
$MAP->MAPOBJ->setSummaryState('ERROR');
$MAP->MAPOBJ->fetchIcon();
+ } elseif(isset($map['error'])) {
+ $map['overview_class'] = 'error';
+ $map['overview_url'] =
'javascript:alert(\''.$map['errorMsg'].'\');';
+ $map['summary_output'] = l('Error: '.$map['errorMsg']);
+
+ $MAP->MAPOBJ->clearMembers();
+ $MAP->MAPOBJ->setSummaryState('ERROR');
+ $MAP->MAPOBJ->fetchIcon();
} elseif($MAP->MAPOBJ->checkMaintenance(0)) {
$MAP->MAPOBJ->fetchIcon();
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins