From 967c0cbe7f2c2623c4aedb591fbfeda06e52d278 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 20 Dec 2011 08:38:55 +0000 Subject: [PATCH] FU r106752: unbreak "other sizes" links on File: pages by working around the suck /media system. --- includes/filerepo/file/File.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 9d18f1be47..05f1e2c3d4 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -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" ); -- 2.20.1