FU r104410: don't even bother calling filterThumbnailPurgeList() if 'forRefresh'...
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 28 Nov 2011 08:57:46 +0000 (08:57 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 28 Nov 2011 08:57:46 +0000 (08:57 +0000)
includes/filerepo/file/LocalFile.php

index 9606119..7a7e843 100644 (file)
@@ -730,9 +730,11 @@ class LocalFile extends File {
                $files = $this->getThumbnails();
                
                // Give media handler a chance to filter the purge list
-               $handler = $this->getHandler();
-               if ( $handler ) {
-                       $handler->filterThumbnailPurgeList( $files, $options );
+               if ( !empty( $options['forRefresh'] ) ) {
+                       $handler = $this->getHandler();
+                       if ( $handler ) {
+                               $handler->filterThumbnailPurgeList( $files, $options );
+                       }
                }
                
                $dir = array_shift( $files );