https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106770

Revision: 106770
Author:   aaron
Date:     2011-12-20 08:38:55 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------
FU r106752: unbreak "other sizes" links on File: pages by working around the 
suck /media system.

Modified Paths:
--------------
    trunk/phase3/includes/filerepo/file/File.php

Modified: trunk/phase3/includes/filerepo/file/File.php
===================================================================
--- trunk/phase3/includes/filerepo/file/File.php        2011-12-20 08:22:07 UTC 
(rev 106769)
+++ trunk/phase3/includes/filerepo/file/File.php        2011-12-20 08:38:55 UTC 
(rev 106770)
@@ -756,10 +756,12 @@
                global $wgIgnoreImageErrors, $wgThumbnailEpoch;
 
                $thumbPath = $this->getThumbPath( $thumbName ); // final thumb 
path
-
                if ( $this->repo && $this->repo->canTransformVia404() && !( 
$flags & self::RENDER_NOW ) ) {
                        wfDebug( __METHOD__ . " transformation deferred." );
-                       return $this->handler->getTransform( $this, false, 
$thumbUrl, $params );
+                       // XXX: Pass in the storage path even though we are not 
rendering anything
+                       // and the path is supposed to be an FS path. This is 
due to getScalerType()
+                       // getting called on the path and clobbering the 
$thumb->getUrl() if it's false.
+                       return $this->handler->getTransform( $this, $thumbPath, 
$thumbUrl, $params );
                }
 
                wfDebug( __METHOD__.": Doing stat for $thumbPath\n" );


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to