public $revEndId = 0;
public $dumpUploads = false;
public $dumpUploadFileContents = false;
+ public $orderRevs = false;
protected $reportingInterval = 100;
protected $pageCount = 0;
protected $pageCountLast = 0;
protected $revCountLast = 0;
- protected $outputTypes = array();
- protected $filterTypes = array();
+ protected $outputTypes = [];
+ protected $filterTypes = [];
protected $ID = 0;
if ( $file != '' ) {
require_once $file;
}
- $register = array( $class, 'register' );
- call_user_func_array( $register, array( $this ) );
+ $register = [ $class, 'register' ];
+ call_user_func_array( $register, [ $this ] );
}
function execute() {
*/
function processOptions() {
$sink = null;
- $sinks = array();
+ $sinks = [];
$options = $this->orderedOptions;
foreach ( $options as $arg ) {
} elseif ( is_null( $this->pages ) ) {
# Page dumps: all or by page ID range
if ( $this->startId || $this->endId ) {
- $exporter->pagesByRange( $this->startId, $this->endId );
+ $exporter->pagesByRange( $this->startId, $this->endId, $this->orderRevs );
} elseif ( $this->revStartId || $this->revEndId ) {
$exporter->revsByRange( $this->revStartId, $this->revEndId );
} else {
$dbr = $this->forcedDb;
if ( $this->forcedDb === null ) {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
}
$this->maxCount = $dbr->selectField( $table, "MAX($field)", '', __METHOD__ );
$this->startTime = microtime( true );
}
$this->lb = wfGetLBFactory()->newMainLB();
- $db = $this->lb->getConnection( DB_SLAVE, 'dump' );
+ $db = $this->lb->getConnection( DB_REPLICA, 'dump' );
// Discourage the server from disconnecting us if it takes a long time
// to read out the big ol' batch query.
- $db->setSessionOptions( array( 'connTimeout' => 3600 * 24 ) );
+ $db->setSessionOptions( [ 'connTimeout' => 3600 * 24 ] );
return $db;
}