BUGFIX Fixed undefined calls to URL() in SimpleImageField, replacing them with getURL() instead

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94301 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-12-03 00:38:52 +00:00 committed by Sam Minnee
parent bcf57982cc
commit 0b0e149618

View File

@ -36,9 +36,9 @@ class SimpleImageField extends FileField {
if($imageField && $imageField->exists()) {
$html .= '<div class="thumbnail">';
if($imageField->hasMethod('Thumbnail') && $imageField->Thumbnail()) {
$html .= "<img src=\"".$imageField->Thumbnail()->URL()."\" />";
$html .= "<img src=\"".$imageField->Thumbnail()->getURL()."\" />";
} else if($imageField->CMSThumbnail()) {
$html .= "<img src=\"".$imageField->CMSThumbnail()->URL()."\" />";
$html .= "<img src=\"".$imageField->CMSThumbnail()->getURL()."\" />";
}
$html .= '</div>';
}