Merge "Ensure WCAG level AA contrast"
[lhc/web/wiklou.git] / maintenance / copyFileBackend.php
index 7b92f89..e2e6c6c 100644 (file)
@@ -62,10 +62,6 @@ class CopyFileBackend extends Maintenance {
 
                $rateFile = $this->getOption( 'ratefile' );
 
-               if ( $this->hasOption( 'utf8only' ) && !extension_loaded( 'mbstring' ) ) {
-                       $this->error( "Cannot check for UTF-8, mbstring extension missing.", 1 ); // die
-               }
-
                foreach ( $containers as $container ) {
                        if ( $subDir != '' ) {
                                $backendRel = "$container/$subDir";
@@ -113,7 +109,7 @@ class CopyFileBackend extends Maintenance {
                        foreach ( $srcPathsRel as $srcPathRel ) {
                                // Check up on the rate file periodically to adjust the concurrency
                                if ( $rateFile && ( !$count || ( $count % 500 ) == 0 ) ) {
-                                       $this->mBatchSize = max( 1, (int)file_get_contents( $rateFile ) );
+                                       $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) );
                                        $this->output( "\tBatch size is now {$this->mBatchSize}.\n" );
                                }
                                $batchPaths[$srcPathRel] = 1; // remove duplicates
@@ -140,7 +136,7 @@ class CopyFileBackend extends Maintenance {
                                foreach ( $delPathsRel as $delPathRel ) {
                                        // Check up on the rate file periodically to adjust the concurrency
                                        if ( $rateFile && ( !$count || ( $count % 500 ) == 0 ) ) {
-                                               $this->mBatchSize = max( 1, (int)file_get_contents( $rateFile ) );
+                                               $this->setBatchSize( max( 1, (int)file_get_contents( $rateFile ) ) );
                                                $this->output( "\tBatch size is now {$this->mBatchSize}.\n" );
                                        }
                                        $batchPaths[$delPathRel] = 1; // remove duplicates