diff options
Diffstat (limited to 'includes/Image.php')
-rw-r--r-- | includes/Image.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/Image.php b/includes/Image.php index 09c2286e..e085936c 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -929,17 +929,19 @@ class Image $thumbPath = wfImageThumbDir( $this->name, $this->fromSharedDirectory ) . "/$thumbName"; $thumbUrl = $this->thumbUrlFromName( $thumbName ); - $this->migrateThumbFile( $thumbName ); - if ( file_exists( $thumbPath ) ) { + if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); break; } - - if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { + + wfDebug( "Doing stat for $thumbPath\n" ); + $this->migrateThumbFile( $thumbName ); + if ( file_exists( $thumbPath ) ) { $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); break; } + $thumb = $handler->doTransform( $this, $thumbPath, $thumbUrl, $params ); // Ignore errors if requested |