Turn off banner impressions
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Apr 2017 16:13:29 +0000 (12:13 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Apr 2017 16:13:29 +0000 (12:13 -0400)
Turn off Banner impressions and member exporuser.s

Toolkit/Banners/Campaign.php
Toolkit/Banners/StaticBannersDecorator.php
Toolkit/Members/Exposure.php

index a088566..d4b9046 100644 (file)
@@ -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";
 
index bb968d4..683584c 100644 (file)
@@ -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(
index 6dca33e..ae31c92 100755 (executable)
@@ -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