X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FshowSiteStats.php;h=08f009bd888e21e54fc20338fe8dfe66c893c77b;hb=b70d5dca777473645005eedcc0c547cae07d0ccc;hp=098aba56c4e525842d85ebeba68e2b5236eeffc0;hpb=0fd1a6b62b31be3abd51ca89c98897c8f5b1fd75;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php index 098aba56c4..08f009bd88 100644 --- a/maintenance/showSiteStats.php +++ b/maintenance/showSiteStats.php @@ -43,17 +43,17 @@ class ShowSiteStats extends Maintenance { } public function execute() { - $fields = array( + $fields = [ 'ss_total_edits' => 'Total edits', 'ss_good_articles' => 'Number of articles', 'ss_total_pages' => 'Total pages', 'ss_users' => 'Number of users', 'ss_active_users' => 'Active users', 'ss_images' => 'Number of images', - ); + ]; - // Get cached stats from slave database - $dbr = $this->getDB( DB_SLAVE ); + // Get cached stats from a replica DB + $dbr = $this->getDB( DB_REPLICA ); $stats = $dbr->selectRow( 'site_stats', '*', '', __METHOD__ ); // Get maximum size for each column @@ -74,5 +74,5 @@ class ShowSiteStats extends Maintenance { } } -$maintClass = "ShowSiteStats"; +$maintClass = ShowSiteStats::class; require_once RUN_MAINTENANCE_IF_MAIN;