X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FshowSiteStats.php;h=1d3e43a1e9310db71388a42ec52cc89baa5ec7d2;hb=ce166f103108a142d8483dbc8826d6c14c632c59;hp=098aba56c4e525842d85ebeba68e2b5236eeffc0;hpb=d4ecfc1a5cd83fbd1afce89646376b3937aea299;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php index 098aba56c4..1adb13ef41 100644 --- a/maintenance/showSiteStats.php +++ b/maintenance/showSiteStats.php @@ -26,7 +26,7 @@ * @author Brion Vibber * @author Rob Church * - * @license GNU General Public License 2.0 or later + * @license GPL-2.0-or-later */ require_once __DIR__ . '/Maintenance.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;