From 89d62405b6406337fdb7fecae208f4e920332b2f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 19 Apr 2017 12:13:29 -0400 Subject: [PATCH] Turn off banner impressions Turn off Banner impressions and member exporuser.s --- Toolkit/Banners/Campaign.php | 2 +- Toolkit/Banners/StaticBannersDecorator.php | 2 +- Toolkit/Members/Exposure.php | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Toolkit/Banners/Campaign.php b/Toolkit/Banners/Campaign.php index a088566..d4b9046 100644 --- a/Toolkit/Banners/Campaign.php +++ b/Toolkit/Banners/Campaign.php @@ -274,7 +274,7 @@ class Toolkit_Banners_Campaign FROM banner_campaign_clicks_summary WHERE campaign = :campaign_id) AS clicks"; $sql = " - SELECT bc.*, $impressions, $clicks + SELECT bc.*,0 as impressions,0 as clicks FROM banner_campaigns bc WHERE id = :campaign_id"; diff --git a/Toolkit/Banners/StaticBannersDecorator.php b/Toolkit/Banners/StaticBannersDecorator.php index bb968d4..683584c 100644 --- a/Toolkit/Banners/StaticBannersDecorator.php +++ b/Toolkit/Banners/StaticBannersDecorator.php @@ -247,7 +247,7 @@ class Toolkit_Banners_StaticBannersDecorator implements IteratorAggregate $banner = $this->_decorators[$i]->getBanner(); $campaign = $banner->getCampaign(); - $campaign->incrementImpression($pdo, $catid); + //$campaign->incrementImpression($pdo, $catid); $mailer = $notifier->getMailerForCampaign($campaign->getId()); $mailer->sendNotification( diff --git a/Toolkit/Members/Exposure.php b/Toolkit/Members/Exposure.php index 6dca33e..ae31c92 100755 --- a/Toolkit/Members/Exposure.php +++ b/Toolkit/Members/Exposure.php @@ -189,6 +189,9 @@ class Toolkit_Members_Exposure implements SplObserver */ public function runUpdate() { + if ( $this->_type == 'list' ) { + return false; + } // Make sure the member actually exists in the members table // before we try to manipulate its exposure count. If they don't // exists, then just get us out of here so we don't throw any errors -- 2.17.1