Code style changed, ext-user continued:
[mailer.git] / inc / libs / forced_functions.php
index b7ee9a8d81e5a21f447aebc0572f8755948c0997..e596264e3cb0aa44c7cf537c3504d5a2d53d197c 100644 (file)
@@ -123,7 +123,7 @@ function translateForcedCostsVisibility ($visibility) {
 
 // "Getter" for an array of data from all Forced-PopUps except user's
 function getForcedPopupDataByEarningArray ($content) {
-       die('content=<pre>' . print_r($content, true) . '</pre>' . debug_get_printable_backtrace());
+       die('content=<pre>' . print_r($content, TRUE) . '</pre>' . 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;