From c24c9c89a27cef6775c793080ae17d140840376b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 23:38:37 +0000 Subject: [PATCH] BUGFIX: File don't have method URL(), instead, we use $image->URL, which will call $image->getURL() (from r97783) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102532 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/SimpleImageField.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/forms/SimpleImageField.php b/forms/SimpleImageField.php index 6128a5f4d..e0eaf5257 100755 --- a/forms/SimpleImageField.php +++ b/forms/SimpleImageField.php @@ -90,11 +90,10 @@ class SimpleImageField_Disabled extends FormField { $record = $this->form->getRecord(); $fieldName = $this->name; if($record) $imageField = $record->$fieldName(); - $field = "
"; if($imageField && $imageField->exists()) { - if($imageField->hasMethod('Thumbnail')) $field .= "Thumbnail()->URL()."\" />"; - elseif($imageField->CMSThumbnail()) $field .= "CMSThumbnail()->URL()."\" />"; + if($imageField->hasMethod('Thumbnail')) $field .= "Thumbnail()->URL."\" />"; + elseif($imageField->CMSThumbnail()) $field .= "CMSThumbnail()->URL."\" />"; else {} // This shouldn't be called but it sometimes is for some reason, so we don't do anything }else{ $field .= "";