X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2Fstorage%2FmoveToExternal.php;h=80dc7f96202c7111994202086c7e356aeac3b46e;hb=a5b975edd132e52ee8ce1c725d8195da941c8b7b;hp=ab59cb8d0a98d5c5216e3fed5427668fad7e83bc;hpb=4e90d55fdc9d31d93e24cf05687eb7d180806f44;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++; } }