<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* Second check for visibility
* Call a hook to see if hook wants to override visibility setting
*/
- function checkPermission() {
+ public function checkPermission() {
if (!$this->_mailing) {
return FALSE;
}
}
/**
- * run this page (figure out the action needed and perform it).
+ * Run this page (figure out the action needed and perform it).
*
- * @param null $id
- * @param null $contactID
+ * @param int $id
+ * @param int $contactID
* @param bool $print
* @param bool $allowID
*
* @return void
*/
- function run($id = NULL, $contactID = NULL, $print = TRUE, $allowID = FALSE) {
+ public function run($id = NULL, $contactID = NULL, $print = TRUE, $allowID = FALSE) {
if (is_numeric($id)) {
$this->_mailingID = $id;
}
);
// get contact detail and compose if contact id exists
+ $returnProperties = $this->_mailing->getReturnProperties();
if (isset($this->_contactID)) {
//get details of contact with token value including Custom Field Token Values.CRM-3734
- $returnProperties = $this->_mailing->getReturnProperties();
$params = array('contact_id' => $this->_contactID);
$details = CRM_Utils_Token::getTokenDetails($params,
$returnProperties,
}
else {
//get tokens that are not contact specific resolved
- $params = array('contact_id' => 0);
+ $params = array('contact_id' => 0);
$details = CRM_Utils_Token::getAnonymousTokenDetails($params,
$returnProperties,
TRUE, TRUE, NULL,
get_class($this)
);
- $details = $details[0][0];
+ $details = CRM_Utils_Array::value(0, $details[0]);
$contactId = 0;
}
$mime = &$this->_mailing->compose(NULL, NULL, NULL, $contactId,
}
}
}
-