From e6e03f8db27b75f95bab577914ee30e2e7081d6b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 27 Jan 2009 07:24:46 +0000 Subject: [PATCH] Fixed a bug where the last batch of orphans would be skipped. --- maintenance/storage/recompressTracked.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/maintenance/storage/recompressTracked.php b/maintenance/storage/recompressTracked.php index 7e4ed1b4f4..d8d2e4ef38 100644 --- a/maintenance/storage/recompressTracked.php +++ b/maintenance/storage/recompressTracked.php @@ -333,7 +333,6 @@ class RecompressTracked { } else { $this->info( "Moving orphans..." ); } - $ids = array(); while ( true ) { $res = $dbr->select( 'blob_tracking', @@ -353,6 +352,7 @@ class RecompressTracked { if ( !$res->numRows() ) { break; } + $ids = array(); foreach ( $res as $row ) { $ids[] = $row->bt_text_id; $i++; @@ -366,6 +366,12 @@ class RecompressTracked { array_unshift( $args, 'doOrphanList' ); call_user_func_array( array( $this, 'dispatch' ), $args ); } + if ( count( $ids ) ) { + $args = $ids; + array_unshift( $args, 'doOrphanList' ); + call_user_func_array( array( $this, 'dispatch' ), $args ); + } + $startId = $row->bt_text_id; $this->report( 'orphans', $i, $numOrphans ); } -- 2.20.1