Author: Lars Michelsen <[email protected]>
Date: Sat Dec 3 19:07:43 2011 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Sat Dec 3 19:07:43 2011 +0100
Bugfix: Adding map/automap type to cache files to prevent confilcts with equal
map and automap names
---
ChangeLog | 2 ++
share/server/core/classes/GlobalMapCfg.php | 2 +-
share/server/core/classes/NagVisAutomapCfg.php | 3 +--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69606cd..b77f7b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ Core
* Several code cleanups
* Made view templates configurable (defaults / view_template)
* Bugfix: Correctly adding object_id=0 to global section when creating maps
+ * Bugfix: Adding map/automap type to cache files to prevent confilcts with
+ equal map and automap names
Frontend
* Sorting maps by alias in header menu now
diff --git a/share/server/core/classes/GlobalMapCfg.php
b/share/server/core/classes/GlobalMapCfg.php
index 2e2aff8..3577225 100644
--- a/share/server/core/classes/GlobalMapCfg.php
+++ b/share/server/core/classes/GlobalMapCfg.php
@@ -62,7 +62,7 @@ class GlobalMapCfg {
$this->setConfigFile(cfg('paths', 'mapcfg').$name.'.cfg');
if($this->cacheFile === '') {
- $this->cacheFile =
cfg('paths','var').$name.'.cfg-'.CONST_VERSION.'-cache';
+ $this->cacheFile =
cfg('paths','var').$this->type.'-'.$name.'.cfg-'.CONST_VERSION.'-cache';
$this->defaultsCacheFile = $this->cacheFile.'-defs';
}
diff --git a/share/server/core/classes/NagVisAutomapCfg.php
b/share/server/core/classes/NagVisAutomapCfg.php
index e314a7e..fb2a8a3 100644
--- a/share/server/core/classes/NagVisAutomapCfg.php
+++ b/share/server/core/classes/NagVisAutomapCfg.php
@@ -48,6 +48,7 @@ class NagVisAutomapCfg extends GlobalMapCfg {
}
$this->objIdFile = cfg('paths', 'var').'automap.hostids';
+ $this->type = 'automap';
// Start of the parent constructor
parent::__construct($CORE, $this->name);
@@ -56,8 +57,6 @@ class NagVisAutomapCfg extends GlobalMapCfg {
parent::$validConfig['host']['x']['must'] = 0;
parent::$validConfig['host']['y']['must'] = 0;
- $this->type = 'automap';
-
// Override the default map configuration path with automap path
$this->setConfigFile(cfg('paths', 'automapcfg').$this->name.'.cfg');
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins