From 055f32616bd26003f970183d1637803a0a8c238a Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Thu, 26 May 2011 18:41:06 +0000 Subject: [PATCH] Follow-up r81536: Fix misleading comment in Status and add a comment to LocalFileRestoreBatch::cleanupFailedBatch. --- includes/Status.php | 2 +- includes/filerepo/LocalFile.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/Status.php b/includes/Status.php index 4fce6e9c32..6bd9456404 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -18,7 +18,7 @@ class Status { /** Counters for batch operations */ public $successCount = 0, $failCount = 0; - /** Array to indicate which items of the batch operations failed */ + /** Array to indicate which items of the batch operations were successful */ public $success = array(); /*semi-private*/ var $errors = array(); diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 7ea694ae3f..f86c5dd26f 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -1947,6 +1947,13 @@ class LocalFileRestoreBatch { return $status; } + /** + * Cleanup a failed batch. The batch was only partially successful, so + * rollback by removing all items that were succesfully copied. + * + * @param Status $storeStatus + * @param array $storeBatch + */ function cleanupFailedBatch( $storeStatus, $storeBatch ) { $cleanupBatch = array(); -- 2.20.1