$row === false
or $row->ss_total_pages < $row->ss_good_articles
or $row->ss_total_edits < $row->ss_total_pages
- or $row->ss_users < $row->ss_admins
) {
return false;
}
}
function doUpdate() {
- $fname = 'SiteStatsUpdate::doUpdate';
$dbw = wfGetDB( DB_MASTER );
$updates = '';
# Need a separate transaction because this a global lock
$dbw->begin();
- $dbw->query( $sql, $fname );
+ $dbw->query( $sql, __METHOD__ );
$dbw->commit();
}
}
*/
public static function doAllAndCommit( $update, $noViews = false, $activeUsers = false ) {
// Grab the object and count everything
- $counter = new InitStats( false );
+ $counter = new SiteStatsInit( false );
$counter->edits();
$counter->articles();
$counter->pages();
'ss_good_articles' => $this->mArticles,
'ss_total_pages' => $this->mPages,
'ss_users' => $this->mUsers,
- 'ss_admins' => SiteStats::numberingroup( 'sysop' ), // @todo make this go away
'ss_images' => $this->mFiles );
$conds = array( 'ss_row_id' => 1 );
$views = array( 'ss_total_views' => $this->mViews );