r25565 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25564‎ | r25565 | r25566 >
Date:22:16, 5 September 2007
Author:tstarling
Status:old
Tags:
Comment:
Make it work with thumb.php
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -204,7 +204,7 @@
205205 } else {
206206 $width = $params['width'];
207207 }
208 - return new OggAudioDisplay( $file, $file->getURL(), $width, $height, $length );
 208+ return new OggAudioDisplay( $file, $file->getURL(), $width, $height, $length, $dstPath );
209209 }
210210
211211 // Video thumbnail only
@@ -213,7 +213,7 @@
214214 }
215215
216216 if ( $flags & self::TRANSFORM_LATER ) {
217 - return new OggVideoDisplay( $file, $file->getURL(), $dstUrl, $width, $height, $length );
 217+ return new OggVideoDisplay( $file, $file->getURL(), $dstUrl, $width, $height, $length, $dstPath );
218218 }
219219
220220 $thumbTime = false;
@@ -254,7 +254,7 @@
255255 // Return error box
256256 return new MediaTransformError( 'thumbnail_error', $width, $height, implode( "\n", $lines ) );
257257 }
258 - return new OggVideoDisplay( $file, $file->getURL(), $dstUrl, $width, $height, $length );
 258+ return new OggVideoDisplay( $file, $file->getURL(), $dstUrl, $width, $height, $length, $dstPath );
259259 }
260260
261261 function canRender() { return true; }
@@ -450,7 +450,7 @@
451451 class OggTransformOutput extends MediaTransformOutput {
452452 static $serial = 0;
453453
454 - function __construct( $file, $videoUrl, $thumbUrl, $width, $height, $length, $isVideo ) {
 454+ function __construct( $file, $videoUrl, $thumbUrl, $width, $height, $length, $isVideo, $path ) {
455455 $this->file = $file;
456456 $this->videoUrl = $videoUrl;
457457 $this->url = $thumbUrl;
@@ -458,6 +458,7 @@
459459 $this->height = round( $height );
460460 $this->length = round( $length );
461461 $this->isVideo = $isVideo;
 462+ $this->path = $path;
462463 }
463464
464465 function toHtml( $options = array() ) {
@@ -580,14 +581,14 @@
581582 }
582583
583584 class OggVideoDisplay extends OggTransformOutput {
584 - function __construct( $file, $videoUrl, $thumbUrl, $width, $height, $length ) {
585 - parent::__construct( $file, $videoUrl, $thumbUrl, $width, $height, $length, true );
 585+ function __construct( $file, $videoUrl, $thumbUrl, $width, $height, $length, $path ) {
 586+ parent::__construct( $file, $videoUrl, $thumbUrl, $width, $height, $length, true, $path );
586587 }
587588 }
588589
589590 class OggAudioDisplay extends OggTransformOutput {
590 - function __construct( $file, $videoUrl, $width, $height, $length ) {
591 - parent::__construct( $file, $videoUrl, false, $width, $height, $length, false );
 591+ function __construct( $file, $videoUrl, $width, $height, $length, $path ) {
 592+ parent::__construct( $file, $videoUrl, false, $width, $height, $length, false, $path );
592593 }
593594 }
594595

Status & tagging log