Add the 'full' option explicitly to dumpTextPass.php.
[lhc/web/wiklou.git] / maintenance / populateContentTables.php
index eee534f..20d6b8b 100644 (file)
@@ -72,9 +72,10 @@ class PopulateContentTables extends Maintenance {
 
                $t0 = microtime( true );
 
-               if ( $wgMultiContentRevisionSchemaMigrationStage < MIGRATION_WRITE_BOTH ) {
+               if ( ( $wgMultiContentRevisionSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) === 0 ) {
                        $this->writeln(
-                               "...cannot update while \$wgMultiContentRevisionSchemaMigrationStage < MIGRATION_WRITE_BOTH"
+                               '...cannot update while \$wgMultiContentRevisionSchemaMigrationStage '
+                               . 'does not have the SCHEMA_COMPAT_WRITE_NEW bit set.'
                        );
                        return false;
                }
@@ -91,6 +92,7 @@ class PopulateContentTables extends Maintenance {
 
                $elapsed = microtime( true ) - $t0;
                $this->writeln( "Done. Processed $this->totalCount rows in $elapsed seconds" );
+               return true;
        }
 
        /**
@@ -186,6 +188,11 @@ class PopulateContentTables extends Maintenance {
                        '',
                        __METHOD__
                );
+               if ( !$minmax || !is_numeric( $minmax->min ) || !is_numeric( $minmax->max ) ) {
+                       // No rows?
+                       $minmax = (object)[ 'min' => 1, 'max' => 0 ];
+               }
+
                $batchSize = $this->getBatchSize();
 
                for ( $startId = $minmax->min; $startId <= $minmax->max; $startId += $batchSize ) {