From efd22ef89471e0b1631d8ac44aea9b9474f960e9 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 26 Feb 2013 05:00:20 +0100 Subject: [PATCH] Always recalculate statistics in debug mode --- public_html/classes/campaign.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/classes/campaign.php b/public_html/classes/campaign.php index 9dd9848..5b8192e 100644 --- a/public_html/classes/campaign.php +++ b/public_html/classes/campaign.php @@ -96,9 +96,9 @@ class Campaign extends CPHPDatabaseRecordClass public function UpdateStatistics() { - global $database; + global $database, $cphp_config; - if($this->sLastStatisticsUpdate < time() - (60 * 5)) + if(!empty($cphp_config->debugmode) || $this->sLastStatisticsUpdate < time() - (60 * 5)) { /* Update subscriber count */ if($result = $database->CachedQuery("SELECT COUNT(*) FROM subscriptions WHERE `CampaignId` = :CampaignId AND `Confirmed` = 1", array(":CampaignId" => $this->sId)))