From: Aaron Schulz Date: Fri, 17 Jul 2015 19:27:17 +0000 (-0700) Subject: Removed squid purge in generateAndSaveThumb() X-Git-Tag: 1.31.0-rc.0~10722^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=248204b8025c79645878ac156586443d4fdec69b;p=lhc%2Fweb%2Fwiklou.git Removed squid purge in generateAndSaveThumb() * This is only useful for fixing thumbnails by manually making a thumb.php (non cache-handled) URL. This is what ?action=purge is for. The only edge case is when the thumb listings are out of sync with CDN, in which case ?action=purge does not work. Change-Id: I755532f08aa23e651f118b1efff937e3314805eb --- diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 7ea658da8a..f9e1128a8e 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1095,7 +1095,7 @@ abstract class File implements IDBAccessObject { * @return bool|MediaTransformOutput */ public function generateAndSaveThumb( $tmpFile, $transformParams, $flags ) { - global $wgUseSquid, $wgIgnoreImageErrors; + global $wgIgnoreImageErrors; $stats = RequestContext::getMain()->getStats(); @@ -1149,21 +1149,6 @@ abstract class File implements IDBAccessObject { Hooks::run( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) ); } - // Purge. Useful in the event of Core -> Squid connection failure or squid - // purge collisions from elsewhere during failure. Don't keep triggering for - // "thumbs" which have the main image URL though (bug 13776) - if ( $wgUseSquid ) { - if ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL() ) { - $starttime = microtime( true ); - - SquidUpdate::purge( array( $thumbUrl ) ); - - $stats->timing( 'media.thumbnail.generate.purge', microtime( true ) - $starttime ); - } - } - - - return $thumb; }