Public Member Functions | |
__construct ($useMaster=false) | |
Constructor. | |
edits () | |
Count the total number of edits. | |
articles () | |
Count pages in article space. | |
pages () | |
Count total pages. | |
users () | |
Count total users. | |
views () | |
Count views. | |
files () | |
Count total files. | |
update () | |
Update the current row with the selected values. | |
refresh () | |
Refresh site_stats. | |
Static Public Member Functions | |
static | doAllAndCommit ($update, $noViews=false, $activeUsers=false) |
Do all updates and commit them. | |
Private Member Functions | |
getDbParams () | |
Return three arrays of params for the db queries. | |
Private Attributes | |
$db | |
$mEdits | |
$mArticles | |
$mPages | |
$mUsers | |
$mViews | |
$mFiles = 0 |
Definition at line 246 of file SiteStats.php.
SiteStatsInit::__construct | ( | $ | useMaster = false |
) |
Constructor.
$useMaster | bool Whether to use the master db |
Definition at line 258 of file SiteStats.php.
References wfGetDB().
SiteStatsInit::articles | ( | ) |
Count pages in article space.
Definition at line 276 of file SiteStats.php.
References $wgContentNamespaces.
static SiteStatsInit::doAllAndCommit | ( | $ | update, | |
$ | noViews = false , |
|||
$ | activeUsers = false | |||
) | [static] |
Do all updates and commit them.
More or less a replacement for the original initStats, but without the calls to wfOut()
$update | bool Whether to update the current stats or write fresh | |
$noViews | bool When true, do not update the number of page views | |
$activeUsers | Whether to update the number of active users |
Definition at line 325 of file SiteStats.php.
References SiteStatsUpdate::cacheUpdate(), and wfGetDB().
Referenced by do_stats_init(), and SiteStats::loadAndLazyInit().
SiteStatsInit::edits | ( | ) |
SiteStatsInit::files | ( | ) |
SiteStatsInit::getDbParams | ( | ) | [private] |
Return three arrays of params for the db queries.
Definition at line 373 of file SiteStats.php.
References SiteStats::numberingroup().
SiteStatsInit::pages | ( | ) |
SiteStatsInit::refresh | ( | ) |
Refresh site_stats.
Erase the current record and save all the new values.
Definition at line 362 of file SiteStats.php.
References $dbw, getDbParams(), and wfGetDB().
SiteStatsInit::update | ( | ) |
Update the current row with the selected values.
Definition at line 352 of file SiteStats.php.
References $dbw, getDbParams(), and wfGetDB().
SiteStatsInit::users | ( | ) |
SiteStatsInit::views | ( | ) |
SiteStatsInit::$db [private] |
Definition at line 249 of file SiteStats.php.
SiteStatsInit::$mArticles [private] |
Definition at line 252 of file SiteStats.php.
SiteStatsInit::$mEdits [private] |
Definition at line 252 of file SiteStats.php.
SiteStatsInit::$mFiles = 0 [private] |
Definition at line 252 of file SiteStats.php.
SiteStatsInit::$mPages [private] |
Definition at line 252 of file SiteStats.php.
SiteStatsInit::$mUsers [private] |
Definition at line 252 of file SiteStats.php.
SiteStatsInit::$mViews [private] |
Definition at line 252 of file SiteStats.php.