* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object DAO object on sucess, null otherwise
+ * @return Object
+ * DAO object on sucess, NULL otherwise
* @static
*/
public static function setIsActive($id, $is_active) {
* @param int $messageTemplateID
* @param $from
*
- * @return bool|null
+ * @return bool|NULL
*/
public static function sendReminder($contactId, $email, $messageTemplateID, $from) {
}
list($details) = CRM_Utils_Token::getTokenDetails(array($contactId),
$returnProperties,
- null, null, false,
+ NULL, NULL, FALSE,
$tokens,
'CRM_Core_BAO_MessageTemplate');
$contact = reset($details);
$bodyType = "body_{$value}";
if ($$bodyType) {
CRM_Utils_Token::replaceGreetingTokens($$bodyType, NULL, $contact['contact_id']);
- $$bodyType = CRM_Utils_Token::replaceDomainTokens($$bodyType, $domain, true, $tokens, true);
- $$bodyType = CRM_Utils_Token::replaceContactTokens($$bodyType, $contact, false, $tokens, false, true);
- $$bodyType = CRM_Utils_Token::replaceComponentTokens($$bodyType, $contact, $tokens, true);
- $$bodyType = CRM_Utils_Token::replaceHookTokens($$bodyType, $contact , $categories, true);
+ $$bodyType = CRM_Utils_Token::replaceDomainTokens($$bodyType, $domain, TRUE, $tokens, TRUE);
+ $$bodyType = CRM_Utils_Token::replaceContactTokens($$bodyType, $contact, FALSE, $tokens, FALSE, TRUE);
+ $$bodyType = CRM_Utils_Token::replaceComponentTokens($$bodyType, $contact, $tokens, TRUE);
+ $$bodyType = CRM_Utils_Token::replaceHookTokens($$bodyType, $contact, $categories, TRUE);
}
}
$html = $body_html;
}
// do replacements in message subject
- $messageSubject = CRM_Utils_Token::replaceContactTokens($body_subject, $contact, false, $tokens);
- $messageSubject = CRM_Utils_Token::replaceDomainTokens($messageSubject, $domain, true, $tokens);
- $messageSubject = CRM_Utils_Token::replaceComponentTokens($messageSubject, $contact, $tokens, true);
- $messageSubject = CRM_Utils_Token::replaceHookTokens($messageSubject, $contact, $categories, true);
+ $messageSubject = CRM_Utils_Token::replaceContactTokens($body_subject, $contact, FALSE, $tokens);
+ $messageSubject = CRM_Utils_Token::replaceDomainTokens($messageSubject, $domain, TRUE, $tokens);
+ $messageSubject = CRM_Utils_Token::replaceComponentTokens($messageSubject, $contact, $tokens, TRUE);
+ $messageSubject = CRM_Utils_Token::replaceHookTokens($messageSubject, $contact, $categories, TRUE);
$messageSubject = $smarty->fetch("string:{$messageSubject}");
* @param array $params
* A string-keyed array of function params, see function body for details.
*
- * @return array of four parameters: a boolean whether the email was sent, and the subject, text and HTML templates
+ * @return array
+ * of four parameters: a boolean whether the email was sent, and the subject, text and HTML templates
*/
public static function sendTemplate($params) {
$defaults = array(
if (empty($params['attachments'])) {
$params['attachments'] = array();
}
- $params['attachments'][] = CRM_Utils_Mail::appendPDF('Invoice.pdf', $pdfHtml, $format) ;
+ $params['attachments'][] = CRM_Utils_Mail::appendPDF('Invoice.pdf', $pdfHtml, $format);
}
$pdf_filename = '';
if ($config->doNotAttachPDFReceipt &&