<?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();
if ( $this->hasOption( 'active' ) ) {
$this->output( "Counting active users..." );
- $active = SiteStatsUpdate::cacheUpdate();
+ $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
$this->output( "{$active}\n" );
}
}
$maintClass = "InitStats";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );