dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Display MAX_CHARS / MAX_BYTES in ApiSandbox"
[lhc/web/wiklou.git]
/
maintenance
/
copyFileBackend.php
diff --git
a/maintenance/copyFileBackend.php
b/maintenance/copyFileBackend.php
index
7b92f89
..
ee103b8
100644
(file)
--- a/
maintenance/copyFileBackend.php
+++ b/
maintenance/copyFileBackend.php
@@
-62,10
+62,6
@@
class CopyFileBackend extends Maintenance {
$rateFile = $this->getOption( 'ratefile' );
$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";
foreach ( $containers as $container ) {
if ( $subDir != '' ) {
$backendRel = "$container/$subDir";
@@
-113,11
+109,11
@@
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 ) ) {
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->output( "\tBatch size is now {$this->
mBatchSize
}.\n" );
+ $this->
setBatchSize( max( 1, (int)file_get_contents( $rateFile )
) );
+ $this->output( "\tBatch size is now {$this->
getBatchSize()
}.\n" );
}
$batchPaths[$srcPathRel] = 1; // remove duplicates
}
$batchPaths[$srcPathRel] = 1; // remove duplicates
- if ( count( $batchPaths ) >= $this->
mBatchSize
) {
+ if ( count( $batchPaths ) >= $this->
getBatchSize()
) {
$this->copyFileBatch( array_keys( $batchPaths ), $backendRel, $src, $dst );
$batchPaths = []; // done
}
$this->copyFileBatch( array_keys( $batchPaths ), $backendRel, $src, $dst );
$batchPaths = []; // done
}
@@
-140,11
+136,11
@@
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 ) ) {
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->output( "\tBatch size is now {$this->
mBatchSize
}.\n" );
+ $this->
setBatchSize( max( 1, (int)file_get_contents( $rateFile )
) );
+ $this->output( "\tBatch size is now {$this->
getBatchSize()
}.\n" );
}
$batchPaths[$delPathRel] = 1; // remove duplicates
}
$batchPaths[$delPathRel] = 1; // remove duplicates
- if ( count( $batchPaths ) >= $this->
mBatchSize
) {
+ if ( count( $batchPaths ) >= $this->
getBatchSize()
) {
$this->delFileBatch( array_keys( $batchPaths ), $backendRel, $dst );
$batchPaths = []; // done
}
$this->delFileBatch( array_keys( $batchPaths ), $backendRel, $dst );
$batchPaths = []; // done
}