diff --git a/bureau/admin/adm_var_edit.php b/bureau/admin/adm_var_edit.php
index 07ea315a..3734c8fa 100644
--- a/bureau/admin/adm_var_edit.php
+++ b/bureau/admin/adm_var_edit.php
@@ -21,6 +21,11 @@ $fields = array (
);
getFields($fields);
+variable_get("aaa_test3",
+array("ns1"=> array("ns"=>"ns1.%%FQDN%%", "ip"=>"%%PUBLIC_IP%%", "enabled"=>"%%ENABLED%%"), "ns2"=>array("ns"=>"fdsffsd", "ip"=>"fdsfdfds", "enabled"=>"fds"), 'ns55'=> 'arf' ),
+"This is a test!",
+array("ns1"=> array("ns"=>"ns name", "ip"=>"ip address", "enabled"=>"enabled"), "ns2"=>array("ns"=>"ns name", "ip"=>"ip address", "enabled"=>"enabled"), 'ns3'=>'toto' )
+);
if (empty($var)) {
echo "
";__("Missing var name");echo "
";
@@ -72,8 +77,20 @@ function edit_var($var_arr) {
echo "";
@@ -104,8 +121,20 @@ function add_var($stratatata, $stratatata_arr=null) {
echo "";
diff --git a/bureau/class/m_variables.php b/bureau/class/m_variables.php
index a88799c8..0cc522dc 100644
--- a/bureau/class/m_variables.php
+++ b/bureau/class/m_variables.php
@@ -245,12 +245,32 @@ class m_variables {
echo "";
if (! is_numeric($k)) {
if (is_null($varname)) {
- echo "$k =>";
+ echo "$k";
} else {
- echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k]. " => ";
+ if ( !isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]) || is_array( $this->variables_list()['DEFAULT'][null][$varname]['type'][$k] ) ) {
+ echo $k;
+ } else {
+ echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k];
+ }
}
}
- echo "$l";
+ if (is_array($l)) {
+ echo "";
+ foreach ($l as $m => $n ) {
+ echo "- ";
+ if ( is_numeric($m)) {
+ echo "$m";
+ } else {
+ echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k][$m];
+ }
+ echo " => $n";
+ echo "
";
+ }
+ echo "
";
+ } else {
+ echo " => $l";
+ }
+ echo "";
}
echo "";
} // empty $v