mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: fixed html image saving problem on HtmlEditorField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@75173 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
13547d82a1
commit
e798007f0a
@ -239,10 +239,10 @@ function HtmlEditorField_dataValue_processImage($parts) {
|
||||
$image = Image::find(urldecode($src));
|
||||
|
||||
// If we have an image, insert the resampled one into the src attribute; otherwise, leave the img src alone.
|
||||
if($image) {
|
||||
if($image && $image->getWidth() != $width && $image->getHeight() != $height) {
|
||||
// If we have an image, generate the resized image.
|
||||
$resizedImage = $image->getFormattedImage("ResizedImage",$width, $height);
|
||||
$parts[$partSource['src="']] = $resizedImage->getRelativePath() ;
|
||||
if($resizedImage) $parts[$partSource['src="']] = $resizedImage->getRelativePath();
|
||||
}
|
||||
|
||||
$parts[0] = "";
|
||||
|
Loading…
Reference in New Issue
Block a user