if ( $this->hasOption( 'active' ) ) {
$this->output( "\nCounting and updating active users..." );
- $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
+ $active = SiteStatsUpdate::cacheUpdate( $this->getDB( DB_MASTER ) );
$this->output( "{$active}\n" );
}