Move wfMakeStaticArrayFile() into a class
[lhc/web/wiklou.git] / maintenance / updateCollation.php
index 54ae130..0670454 100644 (file)
@@ -187,13 +187,7 @@ TEXT
                                }
                                # cl_type will be wrong for lots of pages if cl_collation is 0,
                                # so let's update it while we're here.
-                               if ( $title->getNamespace() == NS_CATEGORY ) {
-                                       $type = 'subcat';
-                               } elseif ( $title->getNamespace() == NS_FILE ) {
-                                       $type = 'file';
-                               } else {
-                                       $type = 'page';
-                               }
+                               $type = MWNamespace::getCategoryLinkType( $title->getNamespace() );
                                $newSortKey = $collation->getSortKey(
                                        $title->getCategorySortkey( $prefix ) );
                                if ( $verboseStats ) {
@@ -232,12 +226,6 @@ TEXT
                        } else {
                                $this->output( "$count done.\n" );
                        }
-
-                       if ( !$dryRun && ++$batchCount % self::SYNC_INTERVAL == 0 ) {
-                               $this->output( "Waiting for replica DBs ... " );
-                               wfWaitForSlaves();
-                               $this->output( "done\n" );
-                       }
                } while ( $res->numRows() == self::BATCH_SIZE );
 
                if ( !$dryRun ) {