r90620 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90619‎ | r90620 | r90621 >
Date:22:32, 22 June 2011
Author:dale
Status:deferred
Tags:
Comment:
fixes history view of old sources by not looking for transcodes for old versions of the file ( we only do transcodes for the current version of the file )
Modified paths:
  • /trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php
@@ -197,8 +197,8 @@
198198 // The poster url:
199199 $posterUrl = $this->getUrl();
200200
201 - // Update the $posterUrl to $sizeOverride
202 - if( $sizeOverride && $sizeOverride[0] && intval( $sizeOverride[0] ) != intval( $this->width ) ){
 201+ // Update the $posterUrl to $sizeOverride ( if not an old file )
 202+ if( !$this->file->isOld() && $sizeOverride && $sizeOverride[0] && intval( $sizeOverride[0] ) != intval( $this->width ) ){
203203 $apiUrl = $this->getPosterFromApi( $sizeOverride[0] );
204204 if( $apiUrl ){
205205 $posterUrl = $apiUrl;
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php
@@ -286,6 +286,11 @@
287287 return $sources;
288288 }
289289
 290+ // If an "oldFile" don't look for other sources:
 291+ if( $file->isOld() ){
 292+ return $sources;
 293+ }
 294+
290295 // Just directly return audio sources ( No transcoding for audio for now )
291296 if( $file->getHandler()->isAudio( $file ) ){
292297 return $sources;

Status & tagging log