* @ingroup Maintenance
*/
abstract class DumpIterator extends Maintenance {
-
private $count = 0;
private $startTime;
+ /** @var string|bool|null */
+ private $from;
public function __construct() {
parent::__construct();
$revision->setTitle( Title::newFromText(
rawurldecode( basename( $this->getOption( 'file' ), '.txt' ) )
) );
+ $this->from = false;
$this->handleRevision( $revision );
return;
if ( $this->getDbType() == Maintenance::DB_NONE ) {
global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks;
$wgUseDatabaseMessages = false;
- $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
+ $wgLocalisationCacheConf['storeClass'] = LCStoreNull::class;
$wgHooks['InterwikiLoadPrefix'][] = 'DumpIterator::disableInterwikis';
}
}
}
$this->count++;
- if ( isset( $this->from ) ) {
+ if ( $this->from !== false ) {
if ( $this->from != $title ) {
return;
}
/* Stub function for processing additional options */
public function checkOptions() {
- return;
}
/* Stub function for giving data about what was computed */
public function conclusions() {
- return;
}
/* Core function which does whatever the maintenance script is designed to do */
}
}
-$maintClass = "SearchDump";
+$maintClass = SearchDump::class;
require_once RUN_MAINTENANCE_IF_MAIN;