Module: nagvis
Branch: master
Commit: f0b4aad22c5d67e5521f82834c7b3c20a1d2d64d
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=f0b4aad22c5d67e5521f82834c7b3c20a1d2d64d

Author: LaMi <[email protected]>
Date:   Sat Mar 13 14:39:49 2010 +0100

#215 Fixed main configuration option editing with "_" sign in name using the WUI

---

 share/server/core/classes/CoreModMainCfg.php |    2 +-
 share/server/core/classes/GlobalMainCfg.php  |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/share/server/core/classes/CoreModMainCfg.php 
b/share/server/core/classes/CoreModMainCfg.php
index dc58c78..bd46219 100644
--- a/share/server/core/classes/CoreModMainCfg.php
+++ b/share/server/core/classes/CoreModMainCfg.php
@@ -77,7 +77,7 @@ class CoreModMainCfg extends CoreModule {
        
        private function doEdit($a) {
                foreach($a['opts'] AS $key => $val) {
-                       $key = explode('_', $key);
+                       $key = explode('_', $key, 2);
                        $this->CORE->getMainCfg()->setValue($key[0], $key[1], 
$val);
                }
                
diff --git a/share/server/core/classes/GlobalMainCfg.php 
b/share/server/core/classes/GlobalMainCfg.php
index 6ef4b8e..9fc4f01 100644
--- a/share/server/core/classes/GlobalMainCfg.php
+++ b/share/server/core/classes/GlobalMainCfg.php
@@ -68,10 +68,12 @@ class GlobalMainCfg {
                                        'match' => MATCH_BOOLEAN),
                                'language_detection' => Array('must' => 1,
                                        'editable' => 1,
+                                       'array' => true,
                                        'default' => Array('user', 'session', 
'browser', 'config'),
                                        'match' => MATCH_STRING_NO_SPACE),
                                'language_available' => Array('must' => 1,
                                        'editable' => 1,
+                                       'array' => true,
                                        'default' => Array('de_DE', 'en_US', 
'es_ES', 'fr_FR', 'pt_BR'),
                                        'match' => MATCH_STRING_NO_SPACE),
                                'language' => Array('must' => 1,
@@ -1041,7 +1043,7 @@ class GlobalMainCfg {
                                        }
                                        
                                        // Special options (Arrays)
-                                       if(($sec == 'wui' && $key == 
'allowedforconfig') || ($sec == 'global' && $key == 'language_detection')  || 
($sec == 'global' && $key == 'language_available')) {
+                                       
if(isset($this->validConfig[$sec][$key]['array']) && 
$this->validConfig[$sec][$key]['array'] === true) {
                                                // Explode comma separated list 
to array
                                                $val = explode(',', $val);
                                                


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to