From: Tim Starling Date: Tue, 27 Jan 2009 07:24:46 +0000 (+0000) Subject: Fixed a bug where the last batch of orphans would be skipped. X-Git-Tag: 1.31.0-rc.0~43218 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=e6e03f8db27b75f95bab577914ee30e2e7081d6b;p=lhc%2Fweb%2Fwiklou.git Fixed a bug where the last batch of orphans would be skipped. --- 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 ); }