X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2Fstorage%2FmoveToExternal.php;h=9bb554c64c81cba3bf1df6913409b46196e8a511;hp=776b72fe4103c3962401837af9792f9c835d2c10;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=c340c41b37b5079ba90489f6b212bb8e4642031a diff --git a/maintenance/storage/moveToExternal.php b/maintenance/storage/moveToExternal.php index 776b72fe41..9bb554c64c 100644 --- a/maintenance/storage/moveToExternal.php +++ b/maintenance/storage/moveToExternal.php @@ -24,6 +24,7 @@ define( 'REPORTING_INTERVAL', 1 ); if ( !defined( 'MEDIAWIKI' ) ) { + $optionsWithArgs = [ 'e', 's' ]; require_once __DIR__ . '/../commandLine.inc'; require_once 'resolveStubs.php'; @@ -40,7 +41,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { if ( isset( $options['e'] ) ) { $maxID = $options['e']; } else { - $maxID = $dbw->selectField( 'text', 'MAX(old_id)', false, $fname ); + $maxID = $dbw->selectField( 'text', 'MAX(old_id)', '', $fname ); } $minID = isset( $options['s'] ) ? $options['s'] : 1; @@ -50,7 +51,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { function moveToExternal( $cluster, $maxID, $minID = 1 ) { $fname = 'moveToExternal'; $dbw = wfGetDB( DB_MASTER ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $count = $maxID - $minID + 1; $blockSize = 1000;