* Follow-up r107447: removed dead code
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 27 Dec 2011 22:49:37 +0000 (22:49 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 27 Dec 2011 22:49:37 +0000 (22:49 +0000)
* Broke some long lines

includes/filerepo/file/File.php

index 3ff17f7..21f2f98 100644 (file)
@@ -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' ) );