mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
884ad43916
commit
17a55042ca
@ -942,7 +942,7 @@ JS
|
|||||||
|
|
||||||
// TODO This should be replaced with casting
|
// TODO This should be replaced with casting
|
||||||
if(array_key_exists($field->Name, $this->csvFieldFormatting)) {
|
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 = preg_replace('/\$([A-Za-z0-9-_]+)/','$item->$1', $format);
|
||||||
$format = str_replace('__VAL__', '$value', $format);
|
$format = str_replace('__VAL__', '$value', $format);
|
||||||
eval('$value = "' . $format . '";');
|
eval('$value = "' . $format . '";');
|
||||||
|
Loading…
Reference in New Issue
Block a user