Merge "Use english messages for background use of Status::getWikiText"
[lhc/web/wiklou.git] / includes / SiteStats.php
index 580f7cc..acd5262 100644 (file)
@@ -36,9 +36,6 @@ class SiteStats {
        /** @var int[] */
        private static $pageCount = [];
 
-       /** @var int[] */
-       private static $groupMemberCounts = [];
-
        static function recache() {
                self::load( true );
        }
@@ -289,8 +286,10 @@ class SiteStatsInit {
        public function __construct( $database = false ) {
                if ( $database instanceof IDatabase ) {
                        $this->db = $database;
+               } elseif ( $database ) {
+                       $this->db = wfGetDB( DB_MASTER );
                } else {
-                       $this->db = wfGetDB( $database ? DB_MASTER : DB_SLAVE );
+                       $this->db = wfGetDB( DB_SLAVE, 'vslow' );
                }
        }