X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fstorage%2FmoveToExternal.php;h=80dc7f96202c7111994202086c7e356aeac3b46e;hb=21463af0d8db7d7ea8e0e87e48e75cd3acb832b7;hp=ab59cb8d0a98d5c5216e3fed5427668fad7e83bc;hpb=28b59da2a14b7dbd41ad4693478d68543efc21d7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/moveToExternal.php b/maintenance/storage/moveToExternal.php index ab59cb8d0a..80dc7f9620 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'; @@ -68,11 +69,11 @@ function moveToExternal( $cluster, $maxID, $minID = 1 ) { wfWaitForSlaves(); } - $res = $dbr->select( 'text', array( 'old_id', 'old_flags', 'old_text' ), - array( + $res = $dbr->select( 'text', [ 'old_id', 'old_flags', 'old_text' ], + [ "old_id BETWEEN $blockStart AND $blockEnd", 'old_flags NOT ' . $dbr->buildLike( $dbr->anyString(), 'external', $dbr->anyString() ), - ), $fname ); + ], $fname ); foreach ( $res as $row ) { # Resolve stubs $text = $row->old_text; @@ -117,8 +118,8 @@ function moveToExternal( $cluster, $maxID, $minID = 1 ) { exit; } $dbw->update( 'text', - array( 'old_flags' => $flags, 'old_text' => $url ), - array( 'old_id' => $id ), $fname ); + [ 'old_flags' => $flags, 'old_text' => $url ], + [ 'old_id' => $id ], $fname ); $numMoved++; } }