Index: branches/REL1_10/phase3/includes/Image.php |
— | — | @@ -929,17 +929,19 @@ |
930 | 930 | $thumbPath = wfImageThumbDir( $this->name, $this->fromSharedDirectory ) . "/$thumbName"; |
931 | 931 | $thumbUrl = $this->thumbUrlFromName( $thumbName ); |
932 | 932 | |
933 | | - $this->migrateThumbFile( $thumbName ); |
934 | 933 | |
935 | | - if ( file_exists( $thumbPath ) ) { |
| 934 | + if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { |
936 | 935 | $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); |
937 | 936 | break; |
938 | 937 | } |
939 | | - |
940 | | - if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { |
| 938 | + |
| 939 | + wfDebug( "Doing stat for $thumbPath\n" ); |
| 940 | + $this->migrateThumbFile( $thumbName ); |
| 941 | + if ( file_exists( $thumbPath ) ) { |
941 | 942 | $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); |
942 | 943 | break; |
943 | 944 | } |
| 945 | + |
944 | 946 | $thumb = $handler->doTransform( $this, $thumbPath, $thumbUrl, $params ); |
945 | 947 | |
946 | 948 | // Ignore errors if requested |