r76175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76174‎ | r76175 | r76176 >
Date:00:18, 6 November 2010
Author:platonides
Status:ok
Tags:
Comment:
Do not assign the variable in the condition.
Use transform() instead of the deprecated getThumbnail()
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUploadStash.php
@@ -113,8 +113,8 @@
114114 // ok we're here so the original must exist. Generate the thumbnail.
115115 // because the file is a UploadStashFile, this thumbnail will also be stashed,
116116 // and a thumbnailFile will be created in the thumbnailImage composite object
117 - $thumbnailImage = null;
118 - if ( !( $thumbnailImage = $origFile->getThumbnail( $width ) ) ) {
 117+ $thumbnailImage = $origFile->transform( array( 'width' => $width ) );
 118+ if ( !$thumbnailImage ) {
119119 throw new MWException( 'Could not obtain thumbnail' );
120120 }
121121 $file = $thumbnailImage->thumbnailFile;

Follow-up revisions

RevisionCommit summaryAuthorDate
r76245uploadwizard-deployment: Merge r76175, r76177, r76186 from trunkcatrope13:12, 7 November 2010

Status & tagging log