Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1177,13 +1177,17 @@ |
1178 | 1178 | &updater: A DatabaseUpdater subclass |
1179 | 1179 | |
1180 | 1180 | 'LocalFile::getHistory': called before file history query performed |
1181 | | -$file: the file |
| 1181 | +$file: the File object |
1182 | 1182 | $tables: tables |
1183 | 1183 | $fields: select fields |
1184 | 1184 | $conds: conditions |
1185 | 1185 | $opts: query options |
1186 | 1186 | $join_conds: JOIN conditions |
1187 | 1187 | |
| 1188 | +'LocalFilePurgeThumbnails': called before thumbnails for a local file a purged |
| 1189 | +$file: the File object |
| 1190 | +$type: either "current" or "archive" |
| 1191 | + |
1188 | 1192 | 'LocalisationCacheRecache': Called when loading the localisation data into cache |
1189 | 1193 | $cache: The LocalisationCache object |
1190 | 1194 | $code: language code |
Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -691,7 +691,7 @@ |
692 | 692 | */ |
693 | 693 | function purgeOldThumbnails( $archiveName ) { |
694 | 694 | global $wgUseSquid; |
695 | | - // get a list of old thumbnails and URLs |
| 695 | + // Get a list of old thumbnails and URLs |
696 | 696 | $files = $this->getThumbnails( $archiveName ); |
697 | 697 | $dir = array_shift( $files ); |
698 | 698 | $this->purgeThumbList( $dir, $files ); |
— | — | @@ -705,8 +705,8 @@ |
706 | 706 | } |
707 | 707 | wfRestoreWarnings(); |
708 | 708 | |
709 | | - # Temporary hook for purging Swift thumbnail cache |
710 | | - wfRunHooks( 'LocalFilePurgeThumbnails', array( $dir, 'old' ) ); |
| 709 | + // Purge any custom thumbnail caches |
| 710 | + wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'archive' ) ); |
711 | 711 | |
712 | 712 | // Purge the squid |
713 | 713 | if ( $wgUseSquid ) { |
— | — | @@ -730,8 +730,8 @@ |
731 | 731 | $dir = array_shift( $files ); |
732 | 732 | $this->purgeThumbList( $dir, $files ); |
733 | 733 | |
734 | | - # Temporary hook for purging Swift thumbnail cache |
735 | | - wfRunHooks( 'LocalFilePurgeThumbnails', array( $dir, 'current' ) ); |
| 734 | + // Purge any custom thumbnail caches |
| 735 | + wfRunHooks( 'LocalFilePurgeThumbnails', array( $this, 'current' ) ); |
736 | 736 | |
737 | 737 | // Purge the squid |
738 | 738 | if ( $wgUseSquid ) { |