]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/forced_filter.php
Updated copyright year.
[mailer.git] / inc / filter / forced_filter.php
index 418746971fd938552f9d3ff759cf80fa18506d13..bb4ef2c98d2d29d2d9ed3577f37acb98c80267ec 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -41,10 +41,11 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter to add default forced-ad types
-function FILTER_FORCED_AD_TYPE_DEFAULTS ($data) {
+function FILTER_FORCED_AD_TYPE_DEFAULTS ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Forced-Banner
        array_push(
-               $data,
+               $filterData,
                array(
                        // Forced-Banner
                        'type' => 'BANNER',
@@ -58,7 +59,8 @@ function FILTER_FORCED_AD_TYPE_DEFAULTS ($data) {
        );
 
        // Return data
-       return $data;
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // Filter for collecting data for the member table
@@ -71,7 +73,7 @@ function FILTER_FORCED_POPUP_TABLE_DATA ($filterData) {
 
                // Get max/min/count of all popups
                // @TODO This part is unfinished
-               //die(__FUNCTION__.':OK!');
+               die(__FUNCTION__ . ':filterData=<pre>' . print_r($filterData, TRUE) . '</pre>');
        } // END - if
 
        // Return filter data array
@@ -81,6 +83,7 @@ function FILTER_FORCED_POPUP_TABLE_DATA ($filterData) {
 
 // Filter for changing URL status
 function FILTER_FORCED_CHANGE_CAMPAIGN_STATUS ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        /*
        // Do some dirty fixing here:
        if (($filterData['data']['forced_campaign_status'] == 'STOPPED') && ($filterData['new_status'] == 'pending')) {
@@ -102,16 +105,16 @@ function FILTER_FORCED_CHANGE_CAMPAIGN_STATUS ($filterData) {
 
 // Filter for validating status
 function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) {
-       // Is the new status set?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       // Is the new status set?
        if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) {
                // Abort here, not fine
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!');
-               $filterData['abort'] = false;
+               interruptFilterChain();
        } elseif ($filterData['data']['forced_campaign_status'] != $filterData['prev_status']) {
                // Status is not like prevStatus
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData['data']['forced_campaign_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!');
-               $filterData['abort'] = false;
+               continueFilterChain();
        } // END - if
 
        // Return filter data
@@ -119,5 +122,27 @@ function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) {
        return $filterData;
 }
 
+// Filter for handling click on forced ad
+function FILTER_HANDLE_FORCED_AD_CLICK ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       // Are all required parameters set?
+       die(__FUNCTION__ . ': filterData=<pre>' . print_r($filterData, TRUE) . '</pre>');
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
+// Filter for handling viewing forced banner
+function FILTER_HANDLE_FORCED_AD_VIEW ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       // Are all required parameters set?
+       die(__FUNCTION__ . ': filterData=<pre>' . print_r($filterData, TRUE) . '</pre>');
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
 // [EOF]
 ?>