From 9056a41ebff3ab9bd9578019e85a54f7f6cc86d3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 29 Mar 2011 17:46:07 +0000 Subject: [PATCH] Fix autodetection of numeric fields --- etemplate/inc/class.bo_merge.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 45198a4677..2d571c7326 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -522,6 +522,9 @@ abstract class bo_merge } if ($is_xml) // zip'ed xml document (eg. OO) { + // Numeric fields + $names = array(); + // clean replacements from array values and html or html-entities, which mess up xml foreach($replacements as $name => &$value) { @@ -557,9 +560,8 @@ abstract class bo_merge } // Look for numbers, set their value if needed $format = $replacement = ''; - if($this->numeric_fields) + if($this->numeric_fields || count($names)) { - $names = array(); foreach($this->numeric_fields as $fieldname) { $names[] = preg_quote($fieldname,'/'); }