r107448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107447‎ | r107448 | r107449 >
Date:22:49, 27 December 2011
Author:aaron
Status:ok
Tags:
Comment:
* Follow-up r107447: removed dead code
* Broke some long lines
Modified paths:
  • /trunk/phase3/includes/filerepo/file/File.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/file/File.php
@@ -298,11 +298,12 @@
299299 * @return string
300300 */
301301 function getViewURL() {
302 - if( $this->mustRender()) {
303 - if( $this->canRender() ) {
 302+ if ( $this->mustRender() ) {
 303+ if ( $this->canRender() ) {
304304 return $this->createThumb( $this->getWidth() );
305305 } 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" );
307308 return $this->getURL(); #hm... return NULL?
308309 }
309310 } else {
@@ -779,10 +780,8 @@
780781 }
781782
782783 // 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 );
787786 if ( !$tmpFile ) {
788787 return new MediaTransformError( 'thumbnail_error',
789788 $params['width'], 0, wfMsg( 'thumbnail-temp-create' ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107447re Aaron's comment on r107351: remove double extension from temporary filemah22:39, 27 December 2011

Status & tagging log