From ea15199ece0b00788e63c797b65f98737bb1882d Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Mon, 7 Jul 2008 09:38:27 +0000 Subject: [PATCH] Remove the thumb moving coding all together since thumbs are purged anyway. This should also fix bug 14745. --- includes/filerepo/LocalFile.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 26c732a9ff..dba7cd892d 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -973,11 +973,6 @@ class LocalFile extends File $batch = new LocalFileMoveBatch( $this, $target ); $batch->addCurrent(); $batch->addOlds(); - if( !$this->repo->canTransformVia404() ) { - wfDebugLog( 'imagemove', 'Cannot transform via 404, so move thumbnails' ); - $batch->addThumbs(); - } else - wfDebugLog( 'imagemove', 'No moving thumbnails, ok to transform via 404' ); $status = $batch->execute(); wfDebugLog( 'imagemove', "Finished moving {$this->name}" ); @@ -1704,7 +1699,7 @@ class LocalFileRestoreBatch { * @ingroup FileRepo */ class LocalFileMoveBatch { - var $file, $cur, $olds, $oldcount, $archive, $thumbs, $target, $db; + var $file, $cur, $olds, $oldcount, $archive, $target, $db; function __construct( File $file, Title $target ) { $this->file = $file; @@ -1722,11 +1717,6 @@ class LocalFileMoveBatch { $this->cur = array( $this->oldRel, $this->newRel ); } - function addThumbs() { - // Thumbnails are purged, so no need to move them - $this->thumbs = array(); - } - function addOlds() { $archiveBase = 'archive'; $this->olds = array(); @@ -1818,7 +1808,7 @@ class LocalFileMoveBatch { // Generates triplets for FSRepo::storeBatch() function getMoveTriplets() { - $moves = array_merge( array( $this->cur ), $this->olds, $this->thumbs ); + $moves = array_merge( array( $this->cur ), $this->olds ); $triplets = array(); // The format is: (srcUrl, destZone, destUrl) foreach( $moves as $move ) { // $move: (oldRelativePath, newRelativePath) -- 2.20.1