From: Bryan Tong Minh Date: Thu, 26 May 2011 18:41:06 +0000 (+0000) Subject: Follow-up r81536: Fix misleading comment in Status and add a comment to LocalFileRest... X-Git-Tag: 1.31.0-rc.0~29925 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=055f32616bd26003f970183d1637803a0a8c238a;p=lhc%2Fweb%2Fwiklou.git Follow-up r81536: Fix misleading comment in Status and add a comment to LocalFileRestoreBatch::cleanupFailedBatch. --- 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();