Gallery's perrow was overwriting the original style= attribute.
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 20 Feb 2011 21:31:15 +0000 (21:31 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 20 Feb 2011 21:31:15 +0000 (21:31 +0000)
includes/ImageGallery.php

index 7290e59..aa25c37 100644 (file)
@@ -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(