public function __construct() {
parent::__construct();
- $this->setDescription( 'Script for periodic off-peak updating of the search index' );
+ $this->addDescription( 'Script for periodic off-peak updating of the search index' );
$this->addOption( 's', 'starting timestamp', false, true );
$this->addOption( 'e', 'Ending timestamp', false, true );
$this->addOption(
}
public function execute() {
- $posFile = $this->getOption( 'p', 'searchUpdate.' . wfWikiId() . '.pos' );
+ $posFile = $this->getOption( 'p', 'searchUpdate.' . wfWikiID() . '.pos' );
$end = $this->getOption( 'e', wfTimestampNow() );
if ( $this->hasOption( 's' ) ) {
$start = $this->getOption( 's' );
WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end'";
$res = $dbw->query( $sql, __METHOD__ );
- $this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res );
+ $this->updateSearchIndex( $maxLockTime, [ $this, 'searchIndexUpdateCallback' ], $dbw, $res );
$this->output( "Done\n" );
}