]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/forced_functions.php
Fixed sorting
[mailer.git] / inc / libs / forced_functions.php
index 21a7327a31b94b939ccf91502d38b03e34b9a30b..8309fc0002adbe9fb3c4f073723e9037e34d2ced 100644 (file)
@@ -130,7 +130,7 @@ function getForcedPopupDataByEarningArray ($content) {
 }
 
 // Generator (somewhat getter) for forced-ads type options
-function generateForcedAdsTypeOptions ($type =  NULL) {
+function generateForcedAdsTypeOptions ($type = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$type])) {
                // Generate output and cache it
@@ -154,7 +154,7 @@ function generateForcedAdsTypeOptions ($type =  NULL) {
 }
 
 // Generator (somewhat getter) for forcec-costs visibility options
-function generateForcedCostsVisibilityOptions ($visibility =  NULL) {
+function generateForcedCostsVisibilityOptions ($visibility = NULL) {
        // Is this cached?
        if (!isset($GLOBALS[__FUNCTION__][$visibility])) {
                // Generate output and cache it
@@ -353,7 +353,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data
        $newStatus = strtolower($newStatus);
 
        // Prepare array
-       $filterData =  array(
+       $filterData = array(
                'campaign_id' => $campaignId,
                'prev_status' => $prevStatus,
                'new_status'  => $newStatus,
@@ -424,7 +424,7 @@ function doForcedNotifyAdmin ($messageType, $content) {
 // Notify the user about the performed action
 function doForcedNotifyMember ($messageType, $content) {
        // Skip notification if userid is NULL
-       if (is_null($content['forced_campaign_userid'])) {
+       if (!isValidId($content['forced_campaign_userid'])) {
                // NULL is silently ignored
                return TRUE;
        } // END - if
@@ -502,7 +502,7 @@ function doTemplateForcedAdSelectionBox ($templateName, $clear, $default = NULL)
        $forcedAds = getArrayFromForcedAdsByType();
 
        // Handle it over to generateSelectionBoxFromArray()
-       $content = generateSelectionBoxFromArray($forcedAds, 'forced_ads_id', 'forced_ads_id', '', '', '', $default, 'forced_ads_type');
+       $content = generateSelectionBoxFromArray($forcedAds, 'forced_ads_id', 'forced_ads_id', '', '', '', $default, 'forced_ads_type', FALSE, TRUE);
 
        // Return prepared content
        return $content;
@@ -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, 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;