fix: don't append 'auto px', thats invalid css. Append just 'auto' instead.

This commit is contained in:
nee 2016-11-02 06:33:59 +01:00
parent 186d730468
commit 79eb6c2025
1 changed files with 4 additions and 4 deletions

View File

@ -166,17 +166,17 @@ EOB;
} catch (Exception $e) {
$thumbnail = null;
}
$thumbWidth = $thumbnail ? $thumbnail->width : 'auto';
$thumbHeight = $thumbnail ? $thumbnail->height : 'auto';
$thumbWidthCss = $thumbnail ? $thumbnail->width.'px' : 'auto';
$thumbHeightCss = $thumbnail ? $thumbnail->height.'px' : 'auto';
$out->elementStart('div', array(
'class'=>'attachment-wrapper',
'style'=>'height: ' . $thumbHeight . 'px; width: ' . $thumbWidth . 'px;'
'style'=>'height: ' . $thumbHeightCss . '; width: ' . $thumbWidthCss . ';'
)); /*needs height of thumb*/
$out->elementStart('div', array(
'class'=>$classes,
'onclick'=>'toggleSpoiler(event)',
'style'=>'height: ' . $thumbHeight . 'px; width: ' . $thumbWidth . 'px;'
'style'=>'height: ' . $thumbHeightCss . '; width: ' . $thumbWidthCss . ';'
));
$out->raw(' ');
$out->elementEnd('div');