(bug 36776) Changing User::getNewtalk to use $wgDisableAnonTalk.
[lhc/web/wiklou.git] / maintenance / initStats.php
index 9dd2721..35918bb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Maintenance script to re-initialise or update the site statistics table
+ * Re-initialise or update the site statistics table.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
+/**
+ * Maintenance script to re-initialise or update the site statistics table
+ *
+ * @ingroup Maintenance
+ */
 class InitStats extends Maintenance {
        public function __construct() {
                parent::__construct();
@@ -63,7 +68,7 @@ class InitStats extends Maintenance {
 
                if ( $this->hasOption( 'active' ) ) {
                        $this->output( "Counting active users..." );
-                       $active = SiteStatsUpdate::cacheUpdate();
+                       $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
                        $this->output( "{$active}\n" );
                }
 
@@ -80,4 +85,4 @@ class InitStats extends Maintenance {
 }
 
 $maintClass = "InitStats";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );