r104411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104410‎ | r104411 | r104412 >
Date:08:57, 28 November 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
FU r104410: don't even bother calling filterThumbnailPurgeList() if 'forRefresh' isn't set to be safe
Modified paths:
  • /trunk/phase3/includes/filerepo/file/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/file/LocalFile.php
@@ -730,9 +730,11 @@
731731 $files = $this->getThumbnails();
732732
733733 // Give media handler a chance to filter the purge list
734 - $handler = $this->getHandler();
735 - if ( $handler ) {
736 - $handler->filterThumbnailPurgeList( $files, $options );
 734+ if ( !empty( $options['forRefresh'] ) ) {
 735+ $handler = $this->getHandler();
 736+ if ( $handler ) {
 737+ $handler->filterThumbnailPurgeList( $files, $options );
 738+ }
737739 }
738740
739741 $dir = array_shift( $files );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104410Restored r98710 but with a 'forRefresh' option (not used yet)aaron08:53, 28 November 2011

Comments

#Comment by 😂 (talk | contribs)   14:32, 28 November 2011

empty()?

#Comment by Aaron Schulz (talk | contribs)   18:35, 28 November 2011

We want to check if it is set and evaluates to true. Two separate checks could be done, but I don't see the point.

Status & tagging log