X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Flibs%2Fforced_functions.php;h=21a7327a31b94b939ccf91502d38b03e34b9a30b;hb=f2edf32502b2774dc17ef419a2e6a1c60e361c0a;hp=b7ee9a8d81e5a21f447aebc0572f8755948c0997;hpb=b50d521ee7818a82eb2fb38f17cc6f2675747971;p=mailer.git diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index b7ee9a8d81..21a7327a31 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -121,9 +121,9 @@ function translateForcedCostsVisibility ($visibility) { return $return; } -// "Getter" for an array of data from all Forced-PopUps except user's +// "Getter" for an array of data from all forced-popups except user's own function getForcedPopupDataByEarningArray ($content) { - die('content=
' . print_r($content, true) . '' . debug_get_printable_backtrace()); + die(__FUNCTION__.':content=
' . print_r($content, TRUE) . '' . debug_get_printable_backtrace()); // Finally return the content return $content; @@ -321,24 +321,24 @@ function doForcedAdminActivateCampaigns () { // Do some sanity checks if (!isAdmin()) { // Not allowed to call - return false; + return FALSE; } elseif (countPostSelection('forced_campaign_id') == 0) { // No selections made - return false; + return FALSE; } // Get an array from all pending campaigns $forcedCampaigns = getArrayFromForcedCampaignsByArray(array_keys(postRequestElement('forced_campaign_id')), 'PENDING'); // By default all worked (at this point) - $activated = true; + $activated = TRUE; // Run through all entries foreach ($forcedCampaigns as $campaignId => $campaignData) { // Change the status of this campaign if (!changeForcedCampaignStatus($campaignId, 'PENDING', 'ACTIVE', $campaignData)) { // One didn't work, but continue with others - $activated = false; + $activated = FALSE; } // END - if } // END - foreach @@ -383,7 +383,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data // ---------- Comment out for debugging/developing member actions! --------- if (SQL_AFFECTEDROWS() != 1) { // No, something went wrong - return false; + return FALSE; } // END - if // ---------- Comment out for debugging/developing member actions! --------- @@ -395,7 +395,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data // All done! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'campaignId=' . $campaignId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); - return true; + return TRUE; } // Notify admin(s) with a selected message and content @@ -426,7 +426,7 @@ function doForcedNotifyMember ($messageType, $content) { // Skip notification if userid is NULL if (is_null($content['forced_campaign_userid'])) { // NULL is silently ignored - return true; + return TRUE; } // END - if // Prepare template name @@ -468,7 +468,7 @@ function prepareForcedContentForTemplate ($content) { // ---------------------------------------------------------------------------- // Template helper function to create selection box for all forced-ad types -function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Add all types through the filter $forcedAdTypes = runFilterChain('add_forced_ads_types', array()); @@ -480,7 +480,7 @@ function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $def } // Template helper function to create selection box for costs visibility -function doTemplateForcedCostsVisiblitySelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateForcedCostsVisiblitySelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Init array $costsVisibility = array( 0 => array('visibility' => 'ALL'), @@ -514,7 +514,7 @@ function doTemplateForcedCostsSelectionBox ($templateName, $clear, $default = NU $forcedCosts = getArrayFromForcedCostsByVisibility(); // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', true); + $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', TRUE); // Return prepared content return $content; @@ -523,7 +523,7 @@ function doTemplateForcedCostsSelectionBox ($templateName, $clear, $default = NU // Template helper function to create selection box for foreced campaign userid function doTemplateForcedCampaignUseridSelectionBox ($templateName, $clear, $default = NULL) { // Generate the selection box without all - $content = addMemberSelectionBox($default, false, true, true, 'forced_campaign_userid'); + $content = addMemberSelectionBox($default, FALSE, TRUE, TRUE, 'forced_campaign_userid'); // Return prepared content return $content; @@ -537,7 +537,6 @@ function doTemplateForcedCampaignUseridSelectionBox ($templateName, $clear, $def function addXmlSpecialAdminAddDoForcedAds () { // So set it all here $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; - $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; } @@ -552,7 +551,6 @@ function addXmlSpecialAdminAddDoForcedCampaigns () { function addXmlSpecialAdminAddDoForcedCosts () { // So set it all here $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; - $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; }