mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #1341 from g4b0/8347-getFieldsForImage
BUGFIX: fixed access to asset_preview_width in getFieldsForImage
This commit is contained in:
commit
c1a543feb2
@ -692,7 +692,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
|
||||
*/
|
||||
protected function getFieldsForImage($url, $file) {
|
||||
if($file->File instanceof Image) {
|
||||
$formattedImage = $file->File->generateFormattedImage('SetWidth', Image::$asset_preview_width);
|
||||
$formattedImage = $file->File->generateFormattedImage('SetWidth', Config::inst()->get('Image', 'asset_preview_width'));
|
||||
$thumbnailURL = $formattedImage ? $formattedImage->URL : $url;
|
||||
} else {
|
||||
$thumbnailURL = $url;
|
||||
|
Loading…
Reference in New Issue
Block a user