r57431 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57430‎ | r57431 | r57432 >
Date:19:45, 6 October 2009
Author:dale
Status:deferred
Tags:
Comment:
* updated oggThumb params to use new -n option destination path added in oggThum svn r120
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -298,23 +298,11 @@
299299 if( $wgOggThumbLocation && is_file( $wgOggThumbLocation ) ){
300300 $cmd = wfEscapeShellArg( $wgOggThumbLocation ) .
301301 ' -t '. intval( $thumbtime ) . ' ' .
 302+ ' -n ' . wfEscapeShellArg( $dstPath ) . ' ' .
302303 ' ' . wfEscapeShellArg( $file->getPath() ) . ' 2>&1';
303 - //@@NOTE target output file argument support is on the way
304 - //(will be in the next release of oggThumb)
305 - $orgPath = getcwd();
306 - //change to destination path:
307 - chdir( dirname( $dstPath ) );
308 - $retval = 0;
309304 $returnText = wfShellExec( $cmd, $retval );
310 - //check for the file:
311 - $name = substr( $file->getName(), 0, strrpos( $file->getName(), '.'));
312 - if( is_file( $name ) . '_0.jpg' ){
313 - rename( $name . '_0.jpg', $dstPath);
314 - }
315 - //change back to the orgPath
316 - chdir( $orgPath );
317305 //check if it was successful or if we should try ffmpeg:
318 - if( is_file ( $dstPath ) ){
 306+ if ( ! $this->removeBadFile( $dstPath, $retval ) ) {
319307 return true;
320308 }
321309 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r120Setting high time limit in the conversion script (if it ever gets used again...)magnus_manske15:14, 11 February 2002

Status & tagging log