X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateSearchIndex.php;h=cdb7d9f701be7532506567a1bdb7d48db40a7878;hb=b798783395ee05bb0f7d682c615458a655646a94;hp=b2f25774a87d5350b7a2af54bb04ae676b7f698b;hpb=3c18e32e58d53ab38d1dd52d00f248ddef435ebd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index b2f25774a8..cdb7d9f701 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -39,7 +39,7 @@ class UpdateSearchIndex extends Maintenance { 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( @@ -61,7 +61,7 @@ class UpdateSearchIndex extends Maintenance { } 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' ); @@ -111,7 +111,7 @@ class UpdateSearchIndex extends Maintenance { 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" ); }