r106761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106760‎ | r106761 | r106762 >
Date:06:48, 20 December 2011
Author:bawolff
Status:ok
Tags:
Comment:
follow-up r98710/r104410. I personally think that forRefresh is confusing, since a purge is always in essence a "refresh"ing operation. change it to forThumbRefresh.
Modified paths:
  • /trunk/phase3/includes/WikiFilePage.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/File.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiFilePage.php
@@ -156,12 +156,12 @@
157157 $update = new HTMLCacheUpdate( $this->mTitle, 'imagelinks' );
158158 $update->doUpdate();
159159 $this->mFile->upgradeRow();
160 - $this->mFile->purgeCache( array( 'forRefresh' => true ) );
 160+ $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
161161 } else {
162162 wfDebug( 'ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n" );
163163 // even if the file supposedly doesn't exist, force any cached information
164164 // to be updated (in case the cached information is wrong)
165 - $this->mFile->purgeCache( array( 'forRefresh' => true ) );
 165+ $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
166166 }
167167 return parent::doPurge();
168168 }
Index: trunk/phase3/includes/filerepo/file/LocalFile.php
@@ -722,7 +722,7 @@
723723 $files = $this->getThumbnails();
724724
725725 // Give media handler a chance to filter the purge list
726 - if ( !empty( $options['forRefresh'] ) ) {
 726+ if ( !empty( $options['forThumbRefresh'] ) ) {
727727 $handler = $this->getHandler();
728728 if ( $handler ) {
729729 $handler->filterThumbnailPurgeList( $files, $options );
Index: trunk/phase3/includes/filerepo/file/File.php
@@ -923,7 +923,7 @@
924924 * STUB
925925 * Overridden by LocalFile
926926 * @param $options Array Options, which include:
927 - * 'forRefresh' : The purging is only to refresh thumbnails
 927+ * 'forThumbRefresh' : The purging is only to refresh thumbnails
928928 */
929929 function purgeCache( $options = array() ) {}
930930

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98710Follow-up r84395: Give MediaHandlers the option to remove items from the thum...btongminh20:08, 2 October 2011
r104410Restored r98710 but with a 'forRefresh' option (not used yet)aaron08:53, 28 November 2011

Status & tagging log