Module: nagvis
Branch: master
Commit: 62b2f0afd0cdf48fadd8d2cb48f0bacd36e56889
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=62b2f0afd0cdf48fadd8d2cb48f0bacd36e56889

Author: Roman Kyrylych <[email protected]>
Date:   Thu Jul 23 13:02:27 2009 +0300

Fixed automap thumbnail generation

Signed-off-by: Roman Kyrylych <[email protected]>

---

 share/nagvis/includes/classes/NagVisAutoMap.php    |    2 ++
 share/nagvis/includes/classes/NagVisAutomapCfg.php |    9 ++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/share/nagvis/includes/classes/NagVisAutoMap.php 
b/share/nagvis/includes/classes/NagVisAutoMap.php
index d255927..eac2908 100644
--- a/share/nagvis/includes/classes/NagVisAutoMap.php
+++ b/share/nagvis/includes/classes/NagVisAutoMap.php
@@ -72,6 +72,8 @@ class NagVisAutoMap extends GlobalMap {
                
                parent::__construct($CORE, $MAPCFG);
 
+               $this->name = $this->MAPCFG->getName();
+
                // Set the preview option
                if(isset($prop['preview']) && $prop['preview'] != '') {
                        $this->preview = $prop['preview'];
diff --git a/share/nagvis/includes/classes/NagVisAutomapCfg.php 
b/share/nagvis/includes/classes/NagVisAutomapCfg.php
index d6c8145..d602ae3 100644
--- a/share/nagvis/includes/classes/NagVisAutomapCfg.php
+++ b/share/nagvis/includes/classes/NagVisAutomapCfg.php
@@ -37,14 +37,17 @@ class NagVisAutomapCfg extends GlobalMapCfg {
        public function __construct($CORE, $name) {

                // Fix the automap name (backward compatible to old automap=1)

                if(isset($name) && $name === '1') {

-                       $name = '__automap';

+                       $this->name = '__automap';

+               }

+               else {

+                       $this->name     = $name;

                }

                

                // Start of the parent constructor

-               parent::__construct($CORE, $name);

+               parent::__construct($CORE, $this->name);

                

                // Override the default map configuration path with automap path

-               $this->setConfigFile($CORE->MAINCFG->getValue('paths', 
'automapcfg').$name.'.cfg');

+               $this->setConfigFile($CORE->MAINCFG->getValue('paths', 
'automapcfg').$this->name.'.cfg');

                

                // Re-initialize the cache

                $this->initCache();



------------------------------------------------------------------------------
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to