FU r106752: unbreak "other sizes" links on File: pages by working around the suck...
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 20 Dec 2011 08:38:55 +0000 (08:38 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 20 Dec 2011 08:38:55 +0000 (08:38 +0000)
includes/filerepo/file/File.php

index 9d18f1b..05f1e2c 100644 (file)
@@ -756,10 +756,12 @@ abstract class File {
                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" );