From 73ad3337dd14e31e3c08ac64cebc46acb154865b Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Sun, 20 Feb 2011 21:31:15 +0000 Subject: [PATCH] Gallery's perrow was overwriting the original style= attribute. --- includes/ImageGallery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 7290e5918e..aa25c37f0b 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -227,7 +227,8 @@ class ImageGallery if ( $this->mPerRow > 0 ) { $maxwidth = $this->mPerRow * ( $this->mWidths + 50 ); - $this->mAttribs['style'] = "max-width: {$maxwidth}px;_width: {$maxwidth}px;"; + $oldStyle = isset( $this->mAttribs['style'] ) ? $this->mAttribs['style'] : ""; + $this->mAttribs['style'] = "max-width: {$maxwidth}px;_width: {$maxwidth}px;" . $oldStyle; } $attribs = Sanitizer::mergeAttributes( -- 2.20.1