'prev_status' => $prevStatus,
'new_status' => $newStatus,
'data' => $data,
- 'abort' => NULL
);
// Run pre filter chain
// Notify admin(s) with a selected message and content
function doForcedNotifyAdmin ($messageType, $content) {
// Prepare template name
- $templateName = sprintf("admin_forced_%s", $messageType);
+ $templateName = sprintf('admin_forced_%s', $messageType);
+
+ // Is the user id valid?
+ if (!isValidId($content['forced_campaign_userid'])) {
+ // No, then use admin-only template
+ $templateName = sprintf('admin_only_forced_%s', $messageType);
+ } // END - if
// Prepare subject
- $subject = sprintf("{--ADMIN_FORCED_NOTIFY_%s_SUBJECT--}",
- strtoupper($messageType)
- );
+ $subject = sprintf('{--ADMIN_FORCED_NOTIFY_%s_SUBJECT--}', strtoupper($messageType));
// Is the subject line there?
if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) {
} // END - if
// Prepare template name
- $templateName = sprintf("member_forced_%s", $messageType);
+ $templateName = sprintf('member_forced_%s', $messageType);
// Prepare subject
- $subject = sprintf("{--MEMBER_FORCED_NOTIFY_%s_SUBJECT--}",
- strtoupper($messageType)
- );
+ $subject = sprintf('{--MEMBER_FORCED_NOTIFY_%s_SUBJECT--}', strtoupper($messageType));
// Is the subject line there?
if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) {
$forcedAds = getArrayFromForcedAdsByType();
// Handle it over to generateSelectionBoxFromArray()
- $content = generateSelectionBoxFromArray($forcedAds, 'forced_ads_id', 'forced_ads_id', '', '', '', $default, 'forced_ads_type', FALSE, TRUE);
+ $content = generateSelectionBoxFromArray($forcedAds, 'forced_ads_id', 'forced_ads_id', '', '', '', $default, 'forced_ads_type');
// Return prepared content
return $content;
$forcedCosts = getArrayFromForcedCostsByVisibility();
// Handle it over to generateSelectionBoxFromArray()
- $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', TRUE, TRUE);
+ $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', TRUE);
// Return prepared content
return $content;
// 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;