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

Author: LaMi <[email protected]>
Date:   Sun Jan 10 15:46:58 2010 +0100

Arrays are displayed comma separated in main cfg edit dialog

---

 share/server/core/classes/WuiViewEditMainCfg.php |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/share/server/core/classes/WuiViewEditMainCfg.php 
b/share/server/core/classes/WuiViewEditMainCfg.php
index 97db1b2..961eece 100644
--- a/share/server/core/classes/WuiViewEditMainCfg.php
+++ b/share/server/core/classes/WuiViewEditMainCfg.php
@@ -111,7 +111,13 @@ class WuiViewEditMainCfg {
                                                
                                                // Create a "helper" field 
which contains the real applied value
                                                if($val2 === false) {
-                                                       $ret .= '<input 
type="hidden" id="_'.$cat.'_'.$propname.'" name="_'.$cat.'_'.$propname.'" 
value="'.$this->CORE->getMainCfg()->getValue($cat, $propname, false).'" />';
+                                                       $defaultValue = 
$this->CORE->getMainCfg()->getValue($cat, $propname, false);
+                                                       
+                                                       
if(is_array($defaultValue)) {
+                                                               $defaultValue = 
implode(',', $defaultValue);
+                                                       }
+                                                       
+                                                       $ret .= '<input 
type="hidden" id="_'.$cat.'_'.$propname.'" name="_'.$cat.'_'.$propname.'" 
value="'.$defaultValue.'" />';
                                                } else {
                                                        $ret .= '<input 
type="hidden" id="_'.$cat.'_'.$propname.'" name="_'.$cat.'_'.$propname.'" 
value="" />';
                                                }
@@ -179,15 +185,15 @@ class WuiViewEditMainCfg {
                                                                $ret .= 
'<script>document.edit_config.elements[\''.$cat.'_'.$propname.'\'].value = 
\''.$val2.'\';</script>';
                                                        break;
                                                        case 'text':
+                                                               
if(is_array($val2)) {
+                                                                       $val2 = 
implode(',', $val2);
+                                                               }
+                                                               
                                                                $ret .= '<input 
id="'.$cat.'_'.$propname.'" type="text" name="'.$cat.'_'.$propname.'" 
value="'.$val2.'" onBlur="validateMainConfigFieldValue(this)" />';
                                                                
                                                                
if(isset($prop['locked']) && $prop['locked'] == 1) {
                                                                        $ret .= 
"<script>document.edit_config.elements['".$cat."_".$propname."'].disabled=true;</script>";
                                                                }
-                                                               
-                                                               
if(is_array($val2)) {
-                                                                       $val2 = 
implode(',',$val2);
-                                                               }
                                                        break;
                                                }
                                                


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to