AddSubscriberToPublication() public static method

public static AddSubscriberToPublication ( integer $p_subscriptionId, integer $p_publicationId, integer $p_languageId, array $p_values = null ) : boolean
$p_subscriptionId integer
$p_publicationId integer
$p_languageId integer
$p_values array
return boolean
Exemplo n.º 1
0
	$errorMsgs[] = getGS('The subscription could not be added.')
				.' '.getGS("Please check if there isn't another subscription to the same publication.");
} else {
        $logtext = getGS('Subscription added for user #$1 (Publication: $2, Active: $3, Type: $4)',
			 $f_user_id, $f_publication_id, $f_subscription_active, $subsType);
        Log::Message($logtext, null, 181);
}

if ($created && ($f_add_sections_now == 'Y')) {
	$columns = array('StartDate' => $f_subscription_start_date,
			  'Days' => $f_subscription_days,
			  'PaidDays' => $paidDays);
	foreach ($f_language_id as $language_id) {
		$created = SubscriptionSection::AddSubscriberToPublication(
			$subscription->getSubscriptionId(),
			$f_publication_id,
			$language_id,
			$columns);
		if (!$created) {
			$errorMsgs[] = getGS('The sections could not be added successfully. Some of them were already added !');
			break;
		}
	}
}
if (sizeof($errorMsgs) == 0) {
	camp_html_goto_page($location);
}

$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Subscribers"), "/$ADMIN/users/?uType=Subscribers");