From 08b017f18566748dd6503107db68e5dda48e77c2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 27 Dec 2011 22:49:37 +0000 Subject: [PATCH] * Follow-up r107447: removed dead code * Broke some long lines --- includes/filerepo/file/File.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 3ff17f7bf9..21f2f984cf 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -298,11 +298,12 @@ abstract class File { * @return string */ function getViewURL() { - if( $this->mustRender()) { - if( $this->canRender() ) { + if ( $this->mustRender() ) { + if ( $this->canRender() ) { return $this->createThumb( $this->getWidth() ); } else { - wfDebug(__METHOD__.': supposed to render '.$this->getName().' ('.$this->getMimeType()."), but can't!\n"); + wfDebug( __METHOD__.': supposed to render ' . $this->getName() . + ' (' . $this->getMimeType() . "), but can't!\n" ); return $this->getURL(); #hm... return NULL? } } else { @@ -779,10 +780,8 @@ abstract class File { } // Create a temp FS file with the same extension and the thumbnail - $extension = $this->getExtension(); - list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( - $extension, $this->getMimeType(), $params ); - $tmpFile = TempFSFile::factory( 'transform_', FileBackend::extensionFromPath( $thumbPath ) ); + $thumbExt = FileBackend::extensionFromPath( $thumbPath ); + $tmpFile = TempFSFile::factory( 'transform_', $thumbExt ); if ( !$tmpFile ) { return new MediaTransformError( 'thumbnail_error', $params['width'], 0, wfMsg( 'thumbnail-temp-create' ) ); -- 2.20.1