X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilter%2Fforced_filter.php;h=b731596c3e60affb68fb4b5376bc79574c2c79de;hb=33a76a20bc94ffe95e9f13906eb7dc5cf354948d;hp=9362149e37d6551eb0fbc73e6964970d93018c19;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/filter/forced_filter.php b/inc/filter/forced_filter.php index 9362149e37..b731596c3e 100644 --- a/inc/filter/forced_filter.php +++ b/inc/filter/forced_filter.php @@ -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=
' . print_r($filterData, TRUE) . '
'); } // 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; + $GLOBALS['filter_chain_aborted'] = FALSE; } 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; + $GLOBALS['filter_chain_aborted'] = FALSE; } // END - if // Return filter data @@ -121,9 +124,9 @@ function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) { // Filter for handling click on forced ad function FILTER_HANDLE_FORCED_AD_CLICK ($filterData) { - // Are all required parameters set? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - die(__FUNCTION__.': CALLED!'); + // Are all required parameters set? + die(__FUNCTION__ . ': filterData=
' . print_r($filterData, TRUE) . '
'); // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); @@ -132,9 +135,9 @@ function FILTER_HANDLE_FORCED_AD_CLICK ($filterData) { // Filter for handling viewing forced banner function FILTER_HANDLE_FORCED_AD_VIEW ($filterData) { - // Are all required parameters set? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - die(__FUNCTION__.': CALLED!'); + // Are all required parameters set? + die(__FUNCTION__ . ': filterData=
' . print_r($filterData, TRUE) . '
'); // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');