From 17a55042caa62f31a37f323c0983ea1f0554942c Mon Sep 17 00:00:00 2001 From: Hayden Smith Date: Sun, 7 Dec 2008 21:30:37 +0000 Subject: [PATCH] BUGFIX: Fixed a check for CSV field formatting. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67582 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/TableListField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/TableListField.php b/forms/TableListField.php index 658c1f626..afe85e347 100755 --- a/forms/TableListField.php +++ b/forms/TableListField.php @@ -942,7 +942,7 @@ JS // TODO This should be replaced with casting if(array_key_exists($field->Name, $this->csvFieldFormatting)) { - $format = str_replace('$value', "__VAL__", $this->csvFieldFormatting[$columnName]); + $format = str_replace('$value', "__VAL__", $this->csvFieldFormatting[$field->Name]); $format = preg_replace('/\$([A-Za-z0-9-_]+)/','$item->$1', $format); $format = str_replace('__VAL__', '$value', $format); eval('$value = "' . $format . '";');