Merge pull request #1341 from g4b0/8347-getFieldsForImage

BUGFIX: fixed access to asset_preview_width in getFieldsForImage
This commit is contained in:
Ingo Schommer 2013-03-27 12:02:23 -07:00
commit c1a543feb2

View File

@ -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;