BUGFIX: fixed access to asset_preview_width in getFieldsForImage

This commit is contained in:
g4b0 2013-03-27 17:52:40 +01:00
parent 373da53826
commit c63d840561

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;