<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
/**
- * class constructor
+ * Class constructor
*/
- function __construct() {
+ public function __construct() {
parent::__construct();
}
/**
* Confirm a pending subscription
*
- * @param int $contact_id The id of the contact
- * @param int $subscribe_id The id of the subscription event
- * @param string $hash The hash
+ * @param int $contact_id
+ * The id of the contact.
+ * @param int $subscribe_id
+ * The id of the subscription event.
+ * @param string $hash
+ * The hash.
*
- * @return boolean True on success
- * @access public
- * @static
+ * @return boolean
+ * True on success
*/
public static function confirm($contact_id, $subscribe_id, $hash) {
$se = &CRM_Mailing_Event_BAO_Subscribe::verify(
$text = CRM_Utils_String::htmlToText($component->body_html);
}
- $bao = new CRM_Mailing_BAO_Mailing();
+ $bao = new CRM_Mailing_BAO_Mailing();
$bao->body_text = $text;
$bao->body_html = $html;
- $tokens = $bao->getTokens();
+ $tokens = $bao->getTokens();
$html = CRM_Utils_Token::replaceDomainTokens($html, $domain, TRUE, $tokens['html']);
$html = CRM_Utils_Token::replaceWelcomeTokens($html, $group->title, TRUE);
$text = CRM_Utils_Token::replaceWelcomeTokens($text, $group->title, FALSE);
$mailParams = array(
- 'groupName' => 'Mailing Event ' . $component->component_type, 'subject' => $component->subject,
+ 'groupName' => 'Mailing Event ' . $component->component_type,
+ 'subject' => $component->subject,
'from' => "\"$domainEmailName\" <do-not-reply@$emailDomain>",
'toEmail' => $email,
'toName' => $display_name,
return $group->title;
}
}
-