self::load();
return self::$row->ss_users;
}
-
+
static function activeUsers() {
self::load();
return self::$row->ss_active_users;
wfDeprecated(__METHOD__);
return self::numberingroup('sysop');
}
-
+
/**
* Find the number of users in a given user group.
* @param string $group Name of group
$hit = $wgMemc->get( $key );
if ( !$hit ) {
$dbr = wfGetDB( DB_SLAVE );
- $hit = $dbr->selectField( 'user_groups', 'COUNT(*)',
- array( 'ug_group' => $group ), __METHOD__ );
+ $hit = $dbr->selectField( 'user_groups', 'COUNT(*)',
+ array( 'ug_group' => $group ), __METHOD__ );
$wgMemc->set( $key, $hit, 3600 );
}
self::$groupMemberCounts[$group] = $hit;
}
- return self::$groupMemberCounts[$group];
+ return self::$groupMemberCounts[$group];
}
static function jobs() {
$dbw->commit();
}
}
-
+
public static function cacheUpdate( $dbw ) {
$dbr = wfGetDB( DB_SLAVE, array( 'SpecialStatistics', 'vslow') );
# Get non-bot users than did some recent action other than making accounts.
$activeUsers = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )',
array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers' OR rc_log_type IS NULL" ),
__METHOD__ );
- $dbw->update( 'site_stats',
+ $dbw->update( 'site_stats',
array( 'ss_active_users' => intval($activeUsers) ),
array( 'ss_row_id' => 1 ), __METHOD__
);