$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}" );
* @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;
$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();
// 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)