Revision: 46327
Author:   tstarling
Date:     2009-01-27 07:24:46 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
Fixed a bug where the last batch of orphans would be skipped. 

Modified Paths:
--------------
    trunk/phase3/maintenance/storage/recompressTracked.php

Modified: trunk/phase3/maintenance/storage/recompressTracked.php
===================================================================
--- trunk/phase3/maintenance/storage/recompressTracked.php      2009-01-27 
07:11:31 UTC (rev 46326)
+++ trunk/phase3/maintenance/storage/recompressTracked.php      2009-01-27 
07:24:46 UTC (rev 46327)
@@ -333,7 +333,6 @@
                } else {
                        $this->info( "Moving orphans..." );
                }
-               $ids = array();
 
                while ( true ) {
                        $res = $dbr->select( 'blob_tracking',
@@ -353,6 +352,7 @@
                        if ( !$res->numRows() ) {
                                break;
                        }
+                       $ids = array();
                        foreach ( $res as $row ) {
                                $ids[] = $row->bt_text_id;
                                $i++;
@@ -366,6 +366,12 @@
                                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 );
                }



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to