Follow-up r81536: Properly extract ($dstZone, $dstRel) from the triplet.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 30 Jun 2011 17:43:20 +0000 (17:43 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 30 Jun 2011 17:43:20 +0000 (17:43 +0000)
includes/filerepo/LocalFile.php

index 3a6666a..1c9040b 100644 (file)
@@ -1981,8 +1981,11 @@ class LocalFileRestoreBatch {
                $cleanupBatch = array(); 
                
                foreach ( $storeStatus->success as $i => $success ) {
+                       // Check if this item of the batch was successfully copied
                        if ( $success ) {
-                               $cleanupBatch[] = array( $storeBatch[$i][1], $storeBatch[$i][1] );
+                               // Item was successfully copied and needs to be removed again
+                               // Extract ($dstZone, $dstRel) from the batch
+                               $cleanupBatch[] = array( $storeBatch[$i][1], $storeBatch[$i][2] );
                        }
                }
                $this->file->repo->cleanupBatch( $cleanupBatch );