From c61d25bd28419aac9a8db97c44a71acf270b0d62 Mon Sep 17 00:00:00 2001 From: "spider@dev" Date: Tue, 17 Jan 2017 23:51:18 -0500 Subject: use mDb->StartTrans because base method StartTrans will clearFromCache --- Statistics.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Statistics.php b/Statistics.php index 3d01867..13a56db 100644 --- a/Statistics.php +++ b/Statistics.php @@ -156,7 +156,7 @@ class Statistics extends BitBase { */ function addPageview() { $dayzero = mktime( 0, 0, 0, date( "m" ), date( "d" ), date( "Y" )); - $this->StartTrans(); + $this->mDb->StartTrans(); // base method StartTrans will clearFromCache $query = "UPDATE `".BIT_DB_PREFIX."stats_pageviews` SET `pageviews`=`pageviews`+1 WHERE `stats_day`=?"; $this->mDb->query( $query, array( $dayzero )); // if the above didn't affect the db, we know that the entry doesn't exist yet. @@ -164,7 +164,7 @@ class Statistics extends BitBase { $query = "INSERT INTO `".BIT_DB_PREFIX."stats_pageviews`( `pageviews`, `stats_day` ) VALUES( ?, ? )"; $this->mDb->query( $query, array( 1, $dayzero )); } - $this->CompleteTrans(); + $this->mDb->CompleteTrans(); } /** -- cgit v1.3