http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76175
Revision: 76175
Author: platonides
Date: 2010-11-06 00:18:30 +0000 (Sat, 06 Nov 2010)
Log Message:
-----------
Do not assign the variable in the condition.
Use transform() instead of the deprecated getThumbnail()
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialUploadStash.php
Modified: trunk/phase3/includes/specials/SpecialUploadStash.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUploadStash.php 2010-11-06
00:14:45 UTC (rev 76174)
+++ trunk/phase3/includes/specials/SpecialUploadStash.php 2010-11-06
00:18:30 UTC (rev 76175)
@@ -113,8 +113,8 @@
// ok we're here so the original must exist. Generate
the thumbnail.
// because the file is a UploadStashFile, this
thumbnail will also be stashed,
// and a thumbnailFile will be created in the
thumbnailImage composite object
- $thumbnailImage = null;
- if ( !( $thumbnailImage = $origFile->getThumbnail(
$width ) ) ) {
+ $thumbnailImage = $origFile->transform( array( 'width'
=> $width ) );
+ if ( !$thumbnailImage ) {
throw new MWException( 'Could not obtain
thumbnail' );
}
$file = $thumbnailImage->thumbnailFile;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs