Author:   Lars Michelsen <[email protected]>
Date:     Sun Jul 10 01:30:48 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sun Jul 10 01:30:48 2011 +0200

Bugfix: Supporting additive sections in both main configuration files

---

 ChangeLog                                   |    3 +++
 share/server/core/classes/GlobalMainCfg.php |   18 ++++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ebf134a..bbae391 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1.5.10
 
+Core:
+  * Bugfix: Supporting additive sections in both main configuration files
+
 Frontend:
   * Bugfix: Fixed problem with hover childs not being displayed and old childs
     being cached (Thanks to Thomas Casteleyn for reporting/fixing)
diff --git a/share/server/core/classes/GlobalMainCfg.php 
b/share/server/core/classes/GlobalMainCfg.php
index 827e90a..6c90347 100644
--- a/share/server/core/classes/GlobalMainCfg.php
+++ b/share/server/core/classes/GlobalMainCfg.php
@@ -1163,14 +1163,16 @@ class GlobalMainCfg {
                                        $sec = strtolower(trim(substr($line, 1, 
strlen($line)-2)));
                                        
                                        // write to array
-                                       if(preg_match('/^backend_/i', $sec)) {
-                                               $this->config[$sec] = Array();
-                                               
$this->config[$sec]['backendid'] = str_replace('backend_','',$sec);
-                                       } elseif(preg_match('/^rotation_/i', 
$sec)) {
-                                               $this->config[$sec] = Array();
-                                               
$this->config[$sec]['rotationid'] = str_replace('rotation_','',$sec);
-                                       } else {
-                                               $this->config[$sec] = Array();
+                                       if(!isset($this->config[$sec])) {
+                                               if(preg_match('/^backend_/i', 
$sec)) {
+                                                       $this->config[$sec] = 
Array();
+                                                       
$this->config[$sec]['backendid'] = str_replace('backend_','',$sec);
+                                               } 
elseif(preg_match('/^rotation_/i', $sec)) {
+                                                       $this->config[$sec] = 
Array();
+                                                       
$this->config[$sec]['rotationid'] = str_replace('rotation_','',$sec);
+                                               } else {
+                                                       $this->config[$sec] = 
Array();
+                                               }
                                        }
                                } else {
                                        // parameter...


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of 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-d2d-c2
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to