- public function update() {
- list( $values, $conds ) = $this->getDbParams();
- $dbw = wfGetDB( DB_MASTER );
- $dbw->update( 'site_stats', $values, $conds, __METHOD__ );
- }
-
- /**
- * Refresh site_stats. Erase the current record and save all
- * the new values.
- */
- public function refresh() {
- list( $values, $conds, $views ) = $this->getDbParams();
- $dbw = wfGetDB( DB_MASTER );
- $dbw->delete( 'site_stats', $conds, __METHOD__ );
- $dbw->insert( 'site_stats', array_merge( $values, $conds, $views ), __METHOD__ );
- }
-
- /**
- * Return three arrays of params for the db queries
- * @return Array
- */
- private function getDbParams() {