Index: trunk/extensions/OggHandler/OggHandler_body.php |
— | — | @@ -298,23 +298,11 @@ |
299 | 299 | if( $wgOggThumbLocation && is_file( $wgOggThumbLocation ) ){ |
300 | 300 | $cmd = wfEscapeShellArg( $wgOggThumbLocation ) . |
301 | 301 | ' -t '. intval( $thumbtime ) . ' ' . |
| 302 | + ' -n ' . wfEscapeShellArg( $dstPath ) . ' ' . |
302 | 303 | ' ' . 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; |
309 | 304 | $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 ); |
317 | 305 | //check if it was successful or if we should try ffmpeg: |
318 | | - if( is_file ( $dstPath ) ){ |
| 306 | + if ( ! $this->removeBadFile( $dstPath, $retval ) ) { |
319 | 307 | return true; |
320 | 308 | } |
321 | 309 | } |