From 4160579f979111346b1a90ea1156edefa909a018 Mon Sep 17 00:00:00 2001 From: Kirti Nanji Date: Wed, 25 Jul 2007 00:26:00 +0000 Subject: [PATCH] Romain fixed a bug regarding the fileuploading. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39231 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/FileField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/FileField.php b/forms/FileField.php index 3213e41ac..b74a000a4 100755 --- a/forms/FileField.php +++ b/forms/FileField.php @@ -11,7 +11,7 @@ class FileField extends FormField { public function saveInto(DataObject $record) { $fieldName = $this->name . 'ID'; - $hasOnes = $record->has_one($fieldName); + $hasOnes = $record->has_one(/*$fieldName*/$this->name); // assume that the file is connected via a has-one if( !$hasOnes )