X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2FupdateArticleCount.php;h=213195df0f42fb8161b363607f4d8e46e8a60ea3;hb=cffd52beee663b489b6683cfed0758b1fcee1695;hp=9537a795156ccb6f2b6905434e1ce385ab4a7777;hpb=3301e78e5a2e5662952c0564f830a492743f9844;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateArticleCount.php b/maintenance/updateArticleCount.php index 9537a79515..213195df0f 100644 --- a/maintenance/updateArticleCount.php +++ b/maintenance/updateArticleCount.php @@ -35,7 +35,7 @@ class UpdateArticleCount extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Count of the number of articles and update the site statistics table"; + $this->addDescription( 'Count of the number of articles and update the site statistics table' ); $this->addOption( 'update', 'Update the site_stats table with the new count' ); $this->addOption( 'use-master', 'Count using the master database' ); } @@ -46,7 +46,7 @@ class UpdateArticleCount extends Maintenance { if ( $this->hasOption( 'use-master' ) ) { $dbr = $this->getDB( DB_MASTER ); } else { - $dbr = $this->getDB( DB_SLAVE, 'vslow' ); + $dbr = $this->getDB( DB_REPLICA, 'vslow' ); } $counter = new SiteStatsInit( $dbr ); $result = $counter->articles(); @@ -57,8 +57,8 @@ class UpdateArticleCount extends Maintenance { $dbw = $this->getDB( DB_MASTER ); $dbw->update( 'site_stats', - array( 'ss_good_articles' => $result ), - array( 'ss_row_id' => 1 ), + [ 'ss_good_articles' => $result ], + [ 'ss_row_id' => 1 ], __METHOD__ ); $this->output( "done.\n" );