From 19eef3f976f3f8a6687e393ff900eb1057277b9a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 24 Sep 2002 21:55:16 +0000 Subject: [PATCH] show values now preservs the values which are arrays --- etemplate/inc/class.editor.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.editor.inc.php b/etemplate/inc/class.editor.inc.php index 5ae6d6e3f7..a3ef6de90b 100644 --- a/etemplate/inc/class.editor.inc.php +++ b/etemplate/inc/class.editor.inc.php @@ -624,7 +624,7 @@ for ($r = 1; list($key,$val) = @each($cont); ++$r) { $vals["@$r"] = $key; - $vals["A$r"] = $val; + $vals["A$r"] = is_array($val) ? htmlspecialchars(serialize($val)).'#SeR#' : $val; } $show->data[$show->rows]['A']['name'] = 'etemplate.editor.values'; $show->data[$show->rows]['A']['size'] = 'vals'; @@ -638,7 +638,8 @@ for ($r = 1; isset($vals["A$r"]); ++$r) { - $content['cont'][$olds["@$r"]] = $vals["A$r"]; + $content['cont'][$olds["@$r"]] = substr($vals["A$r"],-5)=='#SeR#' ? + unserialize(substr($vals["A$r"],0,-5)) : $vals["A$r"]; } } $show->exec('etemplate.editor.show',$content,array(),'',array('olds' => $vals),'');