Index: trunk/phase3/includes/filerepo/file/File.php |
— | — | @@ -298,11 +298,12 @@ |
299 | 299 | * @return string |
300 | 300 | */ |
301 | 301 | function getViewURL() { |
302 | | - if( $this->mustRender()) { |
303 | | - if( $this->canRender() ) { |
| 302 | + if ( $this->mustRender() ) { |
| 303 | + if ( $this->canRender() ) { |
304 | 304 | return $this->createThumb( $this->getWidth() ); |
305 | 305 | } else { |
306 | | - wfDebug(__METHOD__.': supposed to render '.$this->getName().' ('.$this->getMimeType()."), but can't!\n"); |
| 306 | + wfDebug( __METHOD__.': supposed to render ' . $this->getName() . |
| 307 | + ' (' . $this->getMimeType() . "), but can't!\n" ); |
307 | 308 | return $this->getURL(); #hm... return NULL? |
308 | 309 | } |
309 | 310 | } else { |
— | — | @@ -779,10 +780,8 @@ |
780 | 781 | } |
781 | 782 | |
782 | 783 | // Create a temp FS file with the same extension and the thumbnail |
783 | | - $extension = $this->getExtension(); |
784 | | - list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( |
785 | | - $extension, $this->getMimeType(), $params ); |
786 | | - $tmpFile = TempFSFile::factory( 'transform_', FileBackend::extensionFromPath( $thumbPath ) ); |
| 784 | + $thumbExt = FileBackend::extensionFromPath( $thumbPath ); |
| 785 | + $tmpFile = TempFSFile::factory( 'transform_', $thumbExt ); |
787 | 786 | if ( !$tmpFile ) { |
788 | 787 | return new MediaTransformError( 'thumbnail_error', |
789 | 788 | $params['width'], 0, wfMsg( 'thumbnail-temp-create' ) ); |