* @ingroup Maintenance ExternalStorage
*/
-define( 'REPORTING_INTERVAL', 100 );
-
if ( !defined( 'MEDIAWIKI' ) ) {
- $optionsWithArgs = array( 'm' );
+ $optionsWithArgs = [ 'm' ];
require_once __DIR__ . '/../commandLine.inc';
$start = intval( $maxID / $numBlocks ) * $b + 1;
$end = intval( $maxID / $numBlocks ) * ( $b + 1 );
- $res = $dbr->select( 'text', array( 'old_id', 'old_text', 'old_flags' ),
+ $res = $dbr->select( 'text', [ 'old_id', 'old_text', 'old_flags' ],
"old_id>=$start AND old_id<=$end " .
"AND old_flags LIKE '%object%' AND old_flags NOT LIKE '%external%' " .
'AND LOWER(CONVERT(LEFT(old_text,22) USING latin1)) = \'o:15:"historyblobstub"\'',
# Get the (maybe) external row
$externalRow = $dbr->selectRow(
'text',
- array( 'old_text' ),
- array(
+ [ 'old_text' ],
+ [
'old_id' => $stub->mOldId,
'old_flags' . $dbr->buildLike( $dbr->anyString(), 'external', $dbr->anyString() )
- ),
+ ],
$fname
);
# Update the row
# print "oldid=$id\n";
$dbw->update( 'text',
- array( /* SET */
+ [ /* SET */
'old_flags' => $newFlags,
'old_text' => $externalRow->old_text . '/' . $stub->mHash
- ),
- array( /* WHERE */
+ ],
+ [ /* WHERE */
'old_id' => $id
- ), $fname
+ ], $fname
);
}