From: Aaron Schulz Date: Tue, 27 Dec 2011 22:49:37 +0000 (+0000) Subject: * Follow-up r107447: removed dead code X-Git-Tag: 1.31.0-rc.0~25704 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=08b017f18566748dd6503107db68e5dda48e77c2;p=lhc%2Fweb%2Fwiklou.git * Follow-up r107447: removed dead code * Broke some long lines --- 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' ) );