r25488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25487‎ | r25488 | r25489 >
Date:16:51, 4 September 2007
Author:tstarling
Status:old
Tags:
Comment:
Big audio noplayer support
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -187,16 +187,23 @@
188188
189189 if ( $srcHeight == 0 || $srcWidth == 0 ) {
190190 // Make audio player
 191+ $height = empty( $params['height'] ) ? 20 : $params['height'];
191192 if ( $noPlayer ) {
192 - $scriptPath = self::getMyScriptPath();
193 - return new ThumbnailImage( $file, "$scriptPath/info.png", 22, 22 );
 193+ if ( $height > 100 ) {
 194+ global $wgScriptPath;
 195+ $iconUrl = "$wgScriptPath/skins/common/images/icons/fileicon-ogg.png";
 196+ return new ThumbnailImage( $file, $iconUrl, 120, 120 );
 197+ } else {
 198+ $scriptPath = self::getMyScriptPath();
 199+ $iconUrl = "$scriptPath/info.png";
 200+ return new ThumbnailImage( $file, $iconUrl, 22, 22 );
 201+ }
194202 }
195203 if ( empty( $params['width'] ) ) {
196204 $width = 200;
197205 } else {
198206 $width = $params['width'];
199207 }
200 - $height = empty( $params['height'] ) ? 20 : $params['height'];
201208 return new OggAudioDisplay( $file, $file->getURL(), $width, $height, $length );
202209 }
203210

Status & tagging log