mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #2721 - Show decent preview on FileIFrameField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62892 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2dcda9bd91
commit
08643b3b4b
@ -713,11 +713,7 @@ class Image_Uploader extends Controller {
|
||||
$imageClass = $owner->has_one($data['Field']);
|
||||
|
||||
// If we can't find the relationship, assume its an Image.
|
||||
if( !$imageClass) {
|
||||
if(!is_subclass_of( $imageClass, 'Image' )){
|
||||
$imageClass = 'Image';
|
||||
}
|
||||
}
|
||||
if( !$imageClass) $imageClass = 'Image';
|
||||
|
||||
// Assuming its a decendant of File
|
||||
$image = new $imageClass();
|
||||
|
Loading…
Reference in New Issue
Block a user