r84073 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84072‎ | r84073 | r84074 >
Date:01:24, 16 March 2011
Author:dale
Status:deferred
Tags:
Comment:
fixed get destination path handler for timed media transform
Modified paths:
  • /trunk/extensions/TimedMediaHandler/TimedMediaHandler_body.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler_body.php
@@ -155,7 +155,9 @@
156156
157157 $srcWidth = $file->getWidth();
158158 $srcHeight = $file->getHeight();
159 -
 159+
 160+ $params['width'] = ( isset( $params['width'] ) )? $params['width'] : $srcWidth;
 161+
160162 $options = array(
161163 'file' => $file,
162164 'length' => $this->getLength( $file ),
Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php
@@ -12,7 +12,7 @@
1313 const PLAYER_ID_PREFIX = 'mwe_player_';
1414
1515 function __construct( $conf ){
16 - $options = array( 'file', 'sources', 'thumbUrl','start', 'end', 'width', 'height', 'length', 'offset', 'isVideo', 'path' );
 16+ $options = array( 'file', 'dstPath', 'sources', 'thumbUrl','start', 'end', 'width', 'height', 'length', 'offset', 'isVideo', 'path' );
1717 foreach ( $options as $key ) {
1818 if( isset( $conf[ $key ]) ){
1919 $this->$key = $conf[$key];
@@ -35,8 +35,11 @@
3636 // else return the fileicon for the poster url:
3737 return "$wgStylePath/common/images/icons/fileicon-ogg.png";
3838 }
 39+ // TODO get the local path
 40+ function getPath(){
 41+ return $this->dstPath;
 42+ }
3943
40 -
4144 function getPlayerHeight(){
4245 // Check if "video" tag output:
4346 if ( $this->isVideo ) {

Status & tagging log