http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65350
Revision: 65350 Author: siebrand Date: 2010-04-20 22:49:50 +0000 (Tue, 20 Apr 2010) Log Message: ----------- (bug 23075) correct MediaTransformError default width in gallery. Contributed by Derk-Jan Hartman. Submitter's remarks: This patch changes the minimum size of a MediaTransformError to 120px, which makes sure it will at least fit galleries. Any smaller and likely it would become unreadable, so keep the ugly in those cases. The patch also changes the message from a table to a div, because there is no real need to use a table here. I have added "display:inline-block" to the css to make it behave almost exactly as an img or table element would (This might be important for [[File:image.gif|180px]], where no other framing is provided.) Modified Paths: -------------- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/media/MediaTransformOutput.php Modified: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES 2010-04-20 22:43:39 UTC (rev 65349) +++ trunk/phase3/RELEASE-NOTES 2010-04-20 22:49:50 UTC (rev 65350) @@ -119,6 +119,7 @@ * (bug 17941) $wgMaxUploadSize is now honored by all upload sources * (bug 23080) New usernames now limited to 235 bytes so that custom skin files work. +* (bug 23075) Correct MediaTransformError default width in gallery. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent Modified: trunk/phase3/includes/media/MediaTransformOutput.php =================================================================== --- trunk/phase3/includes/media/MediaTransformOutput.php 2010-04-20 22:43:39 UTC (rev 65349) +++ trunk/phase3/includes/media/MediaTransformOutput.php 2010-04-20 22:49:50 UTC (rev 65350) @@ -215,10 +215,10 @@ } function toHtml( $options = array() ) { - return "<table class=\"MediaTransformError\" style=\"" . - "width: {$this->width}px; height: {$this->height}px;\"><tr><td>" . + return "<div class=\"MediaTransformError\" style=\"" . + "width: {$this->width}px; height: {$this->height}px; display:inline-block;\">" . $this->htmlMsg . - "</td></tr></table>"; + "</div>"; } function toText() { @@ -242,8 +242,8 @@ class TransformParameterError extends MediaTransformError { function __construct( $params ) { parent::__construct( 'thumbnail_error', - max( isset( $params['width'] ) ? $params['width'] : 0, 180 ), - max( isset( $params['height'] ) ? $params['height'] : 0, 180 ), + max( isset( $params['width'] ) ? $params['width'] : 0, 120 ), + max( isset( $params['height'] ) ? $params['height'] : 0, 120 ), wfMsg( 'thumbnail_invalid_params' ) ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs