Author:   Lars Michelsen <[email protected]>
Date:     Mon Aug 19 12:12:11 2013 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Mon Aug 19 12:13:13 2013 +0200

FIX: Fixed "modify view" dialog for "on demand" automaps

Conflicts:
        share/server/core/classes/CoreModMap.php

---

 ChangeLog                                |    1 +
 share/server/core/classes/CoreModMap.php |   12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2558c24..a3f0bf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@ Frontend:
   * FIX: Fixed "TypeError: oLabel is null" on at least geomaps
   * FIX: Fixed shape image displaying when using external URLS
   * FIX: Hiding        "Edit Map" link for "on demand" automaps
+  * FIX: Fixed "modify view" dialog for "on demand" automaps
 
 Automap:
   * Labels have now a white background to improve the text readability
diff --git a/share/server/core/classes/CoreModMap.php 
b/share/server/core/classes/CoreModMap.php
index 1f96ab1..c8da8b7 100644
--- a/share/server/core/classes/CoreModMap.php
+++ b/share/server/core/classes/CoreModMap.php
@@ -201,7 +201,12 @@ class CoreModMap extends CoreModule {
                         $perm = null;
                     }
 
-                    $VIEW = new WuiViewMapAddModify($aVals['show'], $mode);
+                    if($mode == 'view_params' && !isset($aVals['show']))
+                        $map_name = null;
+                    else
+                        $map_name = $aVals['show'];
+
+                    $VIEW = new WuiViewMapAddModify($map_name, $mode);
                     $VIEW->setAttrs($attrs);
 
                     // This tells the following handling when the page only 
needs to be repainted
@@ -214,7 +219,7 @@ class CoreModMap extends CoreModule {
                     if(isset($aVals['submit']) && $aVals['submit'] != '' && 
!$update) {
                         // The form has been submitted.
                         try {
-                            $success = $this->handleAddModify($mode, $perm, 
$aVals['show'], $attrs, $attrsFiltered);
+                            $success = $this->handleAddModify($mode, $perm, 
$map_name, $attrs, $attrsFiltered);
                         } catch(FieldInputError $e) {
                             $err = $e;
                         }
@@ -347,7 +352,8 @@ class CoreModMap extends CoreModule {
 
     // Validate and process addModify form submissions
     protected function handleAddModify($mode, $perm, $map, $attrs, 
$attrsFiltered) {
-        $this->verifyMapExists($map);
+        if ($mode != 'view_params')
+            $this->verifyMapExists($map);
         $MAPCFG = new GlobalMapCfg($map);
 
         try {


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to