}
$this->addButtons([
- [
- 'type' => 'submit',
- 'name' => ts('Send Your Message'),
- 'spacing' => ' ',
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'submit',
+ 'name' => ts('Send Your Message'),
+ 'spacing' => ' ',
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
$this->addFormRule(['CRM_Friend_Form', 'formRule']);
}
*
*/
class CRM_Grant_BAO_Query extends CRM_Core_BAO_Query {
+
/**
* @return array
*/
if ($this->_action & CRM_Core_Action::DELETE) {
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Delete'),
- 'spacing' => ' ',
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Delete'),
+ 'spacing' => ' ',
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
return;
}
// make this form an upload since we dont know if the custom data injected dynamically
// is of type file etc $uploadNames = $this->get( 'uploadNames' );
$this->addButtons([
- [
- 'type' => 'upload',
- 'name' => ts('Save'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'upload',
- 'name' => ts('Save and New'),
- 'js' => ['onclick' => "return verify( );"],
- 'subName' => 'new',
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'upload',
+ 'name' => ts('Save'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'upload',
+ 'name' => ts('Save and New'),
+ 'js' => ['onclick' => "return verify( );"],
+ 'subName' => 'new',
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
if ($this->_context == 'standalone') {
$this->addEntityRef('contact_id', ts('Applicant'), ['create' => TRUE], TRUE);
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'cancel',
- 'name' => ts('Done'),
- 'spacing' => ' ',
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Done'),
+ 'spacing' => ' ',
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
/**
* Prefix for the controller.
+ * @var string
*/
protected $_prefix = "grant_";
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons([
- [
- 'type' => $nextType,
- 'name' => $title,
- 'isDefault' => TRUE,
- ],
- [
- 'type' => $backType,
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => $nextType,
+ 'name' => $title,
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => $backType,
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
}
// just need to add a javacript to popup the window for printing
//
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Print Grant List'),
- 'js' => ['onclick' => 'window.print()'],
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'back',
- 'name' => ts('Done'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Print Grant List'),
+ 'js' => ['onclick' => 'window.print()'],
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'back',
+ 'name' => ts('Done'),
+ ],
+ ]);
}
/**
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
class CRM_Grant_Info extends CRM_Core_Component_Info {
/**
+ * @var string
* @inheritDoc
*/
protected $keyword = 'grant';
];
}
-
/**
* @inheritDoc
* @param bool $getAllUnconditionally
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
public $_permission = NULL;
public $_contactId = NULL;
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = [
+ public static $_properties = [
'contact_id',
'contact_type',
'sort_name',
*/
class CRM_Grant_Task extends CRM_Core_Task {
- const
- // Grant Tasks
- UPDATE_GRANTS = 701;
+ /**
+ * Grant Tasks
+ */
+ const UPDATE_GRANTS = 701;
- static $objectType = 'grant';
+ /**
+ * @var string
+ */
+ public static $objectType = 'grant';
/**
* These tasks are the core set of tasks that the user can perform
public function buildQuickForm() {
if ($this->_action == CRM_Core_Action::DELETE) {
$this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Delete Group'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
+ array(
+ 'type' => 'next',
+ 'name' => ts('Delete Group'),
+ 'isDefault' => TRUE,
+ ),
+ array(
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ),
+ ));
return;
}
CRM_Custom_Form_CustomData::buildQuickForm($this);
$this->addButtons(array(
- array(
- 'type' => 'upload',
- 'name' => ($this->_action == CRM_Core_Action::ADD) ? ts('Continue') : ts('Save'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
+ array(
+ 'type' => 'upload',
+ 'name' => ($this->_action == CRM_Core_Action::ADD) ? ts('Continue') : ts('Save'),
+ 'isDefault' => TRUE,
+ ),
+ array(
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ),
+ ));
$doParentCheck = FALSE;
if (CRM_Core_Permission::isMultisiteEnabled()) {
* This class contains the functions that are called using AJAX (jQuery)
*/
class CRM_Group_Page_AJAX {
+
/**
* Get list of groups.
*/
/**
* Pseudo-constant pattern array.
+ * @var array
*/
- static $_patterns = NULL;
+ public static $_patterns = NULL;
/**
* Class constructor.
* An array that holds the complete templates
* including any headers or footers that need to be prepended
* or appended to the body.
+ * @var array
*/
private $preparedTemplates = NULL;
* An array that holds the complete templates
* including any headers or footers that need to be prepended
* or appended to the body.
+ * @var array
*/
private $templates = NULL;
/**
* An array that holds the tokens that are specifically found in our text and html bodies.
+ * @var array
*/
private $tokens = NULL;
/**
* An array that holds the tokens that are specifically found in our text and html bodies.
+ * @var array
*/
private $flattenedTokens = NULL;
/**
* The header associated with this mailing.
+ * @var string
*/
private $header = NULL;
/**
* The footer associated with this mailing.
+ * @var string
*/
private $footer = NULL;
/**
* The HTML content of the message.
+ * @var string
*/
private $html = NULL;
/**
* The text content of the message.
+ * @var string
*/
private $text = NULL;
/**
* Cached BAO for the domain.
+ * @var int
*/
private $_domain = NULL;
$this->preparedTemplates = [];
foreach ([
- 'html',
- 'text',
- 'subject',
- ] as $key) {
+ 'html',
+ 'text',
+ 'subject',
+ ] as $key) {
if (!isset($templates[$key])) {
continue;
}
public function getTestRecipients($testParams) {
if (!empty($testParams['test_group']) && array_key_exists($testParams['test_group'], CRM_Core_PseudoConstant::group())) {
$contacts = civicrm_api('contact', 'get', [
- 'version' => 3,
- 'group' => $testParams['test_group'],
- 'return' => 'id',
- 'options' => [
- 'limit' => 100000000000,
- ],
- ]
- );
+ 'version' => 3,
+ 'group' => $testParams['test_group'],
+ 'return' => 'id',
+ 'options' => [
+ 'limit' => 100000000000,
+ ],
+ ]);
foreach (array_keys($contacts['values']) as $groupContact) {
$query = "
* 'include' or 'exclude'.
* @param string $entity
* 'groups' or 'mailings'.
- * @param array <int> $entityIds
+ * @param array $entityIds
* @throws CiviCRM_API3_Exception
*/
public static function replaceGroups($mailingId, $type, $entity, $entityIds) {
break;
case 'opened':
- $reportFilter .= "&distinct=0"; // do not use group by clause in report, because same report used for total and unique open
+ // do not use group by clause in report, because same report used for total and unique open
+ $reportFilter .= "&distinct=0";
case 'opened_unique':
$url = "mailing/opened";
$searchFilter .= "&mailing_open_status=Y";
* Array of mailings for a contact
*
*/
- static public function getContactMailings(&$params) {
+ public static function getContactMailings(&$params) {
$params['version'] = 3;
$params['offset'] = ($params['page'] - 1) * $params['rp'];
$params['limit'] = $params['rp'];
* count of mailings for a contact
*
*/
- static public function getContactMailingsCount(&$params) {
+ public static function getContactMailingsCount(&$params) {
$params['version'] = 3;
return civicrm_api('MailingContact', 'getcount', $params);
}
foreach ($fieldNames as $fieldName) {
if ($fieldName == 'id') {
$fieldPerms[$fieldName] = [
+ // OR
[
'access CiviMail',
'schedule mailings',
'approve mailings',
- 'create mailings',
- ], // OR
+ ],
];
}
elseif (in_array($fieldName, ['scheduled_date', 'scheduled_id'])) {
$fieldPerms[$fieldName] = [
- ['access CiviMail', 'schedule mailings'], // OR
+ // OR
+ ['access CiviMail', 'schedule mailings'],
];
}
elseif (in_array($fieldName, [
'approval_note',
])) {
$fieldPerms[$fieldName] = [
- ['access CiviMail', 'approve mailings'], // OR
+ // OR
+ ['access CiviMail', 'approve mailings'],
];
}
else {
$fieldPerms[$fieldName] = [
- ['access CiviMail', 'create mailings'], // OR
+ // OR
+ ['access CiviMail', 'create mailings'],
];
}
}
*/
public static function getPublicViewUrl($id, $absolute = TRUE) {
if ((civicrm_api3('Mailing', 'getvalue', [
- 'id' => $id,
- 'return' => 'visibility',
- ])) === 'Public Pages') {
+ 'id' => $id,
+ 'return' => 'visibility',
+ ])) === 'Public Pages') {
return CRM_Utils_System::url('civicrm/mailing/view', ['id' => $id], $absolute, NULL, TRUE, TRUE);
}
}
return $result;
}
-
/**
* Delete MailingAB and all its associated records.
*
*
* @var int
*/
- static $mailsProcessed = 0;
+ public static $mailsProcessed = 0;
/**
* Class constructor.
* @return \CRM_Mailing_BAO_MailingJob
* @throws \CRM_Core_Exception
*/
- static public function create($params) {
+ public static function create($params) {
if (empty($params['id']) && empty($params['mailing_id'])) {
throw new CRM_Core_Exception("Failed to create job: Unknown mailing ID");
}
}
}
-
/**
* before we run jobs, we need to split the jobs
* @param int $offset
// CRM-15702: Sending bulk sms to contacts without e-mail address fails.
// Solution is to skip checking for on hold
- $skipOnHold = TRUE; //do include a statement to check wether e-mail address is on hold
+ //do include a statement to check wether e-mail address is on hold
+ $skipOnHold = TRUE;
if ($mailing->sms_provider_id) {
- $skipOnHold = FALSE; //do not include a statement to check wether e-mail address is on hold
+ //do not include a statement to check wether e-mail address is on hold
+ $skipOnHold = FALSE;
}
foreach ($fields as $key => $field) {
*/
class CRM_Mailing_BAO_Query {
- static $_mailingFields = NULL;
+ public static $_mailingFields = NULL;
/**
* @return array|null
'bounce_type_id',
ts('Bounce type(s)'),
CRM_Core_PseudoConstant::get('CRM_Mailing_Event_DAO_Bounce', 'bounce_type_id', [
- 'keyColumn' => 'id',
- 'labelColumn' => 'name',
- ])
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ ])
);
return;
}
$job = new CRM_Mailing_BAO_MailingJob();
- $job->is_test = 0; // if set to 1 it doesn't show in the UI
+ // if set to 1 it doesn't show in the UI
+ $job->is_test = 0;
$job->status = 'Complete';
$job->scheduled_date = CRM_Utils_Date::processDate(date('Y-m-d'), date('H:i:s'));
$job->start_date = $job->scheduled_date;
$job->end_date = $job->scheduled_date;
$job->mailing_id = $mailing->id;
$job->save();
- $job_id = $job->id; // need this for parent_id below
+ // need this for parent_id below
+ $job_id = $job->id;
$job = new CRM_Mailing_BAO_MailingJob();
$job->is_test = 0;
$job->parent_id = $job_id;
$job->job_type = 'child';
$job->save();
- $job_id = $job->id; // this is the one we want for the spool
+ // this is the one we want for the spool
+ $job_id = $job->id;
if (is_array($recipient)) {
$recipient = implode(';', $recipient);
const OUTBOUND_OPTION_SENDMAIL = 1;
const OUTBOUND_OPTION_DISABLED = 2;
const OUTBOUND_OPTION_MAIL = 3;
- const OUTBOUND_OPTION_MOCK = 4; // seems to be the same as 2, but also calls Mail's pre/post hooks? - see packages/Mail
+ // seems to be the same as 2, but also calls Mail's pre/post hooks? - see packages/Mail
+ const OUTBOUND_OPTION_MOCK = 4;
const OUTBOUND_OPTION_REDIRECT_TO_DB = 5;
// special value for mail bulk inserts to avoid
$group[$groupID]['status'] = $contactGroups[$groupID]['status'];
$status = ts('You are already subscribed in %1, your subscription is %2.', [
- 1 => $group[$groupID]['title'],
- 2 => ts($group[$groupID]['status']),
- ]);
+ 1 => $group[$groupID]['title'],
+ 2 => ts($group[$groupID]['status']),
+ ]);
CRM_Utils_System::setUFMessage($status);
continue;
}
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Confirm'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Confirm'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
public function postProcess() {
CRM_Core_DAO::getAttribute('CRM_Mailing_BAO_MailingComponent', 'name'), TRUE
);
$this->addRule('name', ts('Name already exists in Database.'), 'objectExists', [
- 'CRM_Mailing_BAO_MailingComponent',
- $this->_id,
- ]);
+ 'CRM_Mailing_BAO_MailingComponent',
+ $this->_id,
+ ]);
$this->add('select', 'component_type', ts('Component Type'), CRM_Core_SelectValues::mailingComponents());
$this->addFormRule(['CRM_Mailing_Form_Component', 'dataRule']);
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Save'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Save'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
$component = CRM_Mailing_BAO_MailingComponent::add($params);
CRM_Core_Session::setStatus(ts('The mailing component \'%1\' has been saved.', [
- 1 => $component->name,
- ]
- ), ts('Saved'), 'success');
+ 1 => $component->name,
+ ]), ts('Saved'), 'success');
}
}
$errors = [];
foreach ([
- 'text',
- 'html',
- ] as $type) {
+ 'text',
+ 'html',
+ ] as $type) {
$dataErrors = [];
foreach ($InvalidTokens as $token => $desc) {
if ($params['body_' . $type]) {
if (preg_match('/' . preg_quote('{' . $token . '}') . '/', $params['body_' . $type])) {
$dataErrors[] = '<li>' . ts('This message is having a invalid token - %1: %2', [
- 1 => $token,
- 2 => $desc,
- ]) . '</li>';
+ 1 => $token,
+ 2 => $desc,
+ ]) . '</li>';
}
}
}
if (!empty($dataErrors)) {
$errors['body_' . $type] = ts('The following errors were detected in %1 message:', [
- 1 => $type,
- ]) . '<ul>' . implode('', $dataErrors) . '</ul><br /><a href="' . CRM_Utils_System::docURL2('Tokens', TRUE, NULL, NULL, NULL, "wiki") . '">' . ts('More information on tokens...') . '</a>';
+ 1 => $type,
+ ]) . '<ul>' . implode('', $dataErrors) . '</ul><br /><a href="' . CRM_Utils_System::docURL2('Tokens', TRUE, NULL, NULL, NULL, "wiki") . '">' . ts('More information on tokens...') . '</a>';
}
}
return empty($errors) ? TRUE : $errors;
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Mailing_Form_ForwardMailing extends CRM_Core_Form {
+
public function preProcess() {
$job_id = CRM_Utils_Request::retrieve('jid', 'Positive',
$this, NULL
}
$status = ts('Mailing is not forwarded to the given email address.', [
- 'count' => count($emails),
- 'plural' => 'Mailing is not forwarded to the given email addresses.',
- ]);
+ 'count' => count($emails),
+ 'plural' => 'Mailing is not forwarded to the given email addresses.',
+ ]);
if ($forwarded) {
$status = ts('Mailing is forwarded successfully to %count email address.', [
- 'count' => $forwarded,
- 'plural' => 'Mailing is forwarded successfully to %count email addresses.',
- ]);
+ 'count' => $forwarded,
+ 'plural' => 'Mailing is forwarded successfully to %count email addresses.',
+ ]);
}
CRM_Utils_System::setUFMessage($status);
!CRM_Utils_System::isNull($params[$field])
) {
if (in_array($field, [
- 'mailing_from',
- 'mailing_to',
- ]) && !$params["mailing_relative"]
- ) {
+ 'mailing_from',
+ 'mailing_to',
+ ]) && !$params["mailing_relative"]) {
$time = ($field == 'mailing_to') ? '235959' : NULL;
$parent->set($field, CRM_Utils_Date::processDate($params[$field], $time));
}
}
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Subscribe'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Subscribe'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons([
- [
- 'type' => $nextType,
- 'name' => $title,
- 'isDefault' => TRUE,
- ],
- [
- 'type' => $backType,
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => $nextType,
+ 'name' => $title,
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => $backType,
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
}
// just need to add a javacript to popup the window for printing
//
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Print Mailing Recipients'),
- 'js' => ['onclick' => 'window.print()'],
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'back',
- 'name' => ts('Done'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Print Mailing Recipients'),
+ 'js' => ['onclick' => 'window.print()'],
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'back',
+ 'name' => ts('Done'),
+ ],
+ ]);
}
/**
class CRM_Mailing_Info extends CRM_Core_Component_Info {
/**
+ * @var string
* @inheritDoc
*/
protected $keyword = 'mailing';
-
/**
* @inheritDoc
* @return array
foreach ($reportTypes as $report) {
$result = civicrm_api3('ReportInstance', 'get', [
'sequential' => 1,
- 'report_id' => 'mailing/' . $report]);
+ 'report_id' => 'mailing/' . $report,
+ ]);
if (!empty($result['values'])) {
$reportIds[$report] = $result['values'][0]['id'];
}
'disableMandatoryTokensCheck' => (int) Civi::settings()->get('disable_mandatory_tokens_check'),
'fromAddress' => $fromAddress['values'],
'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', [
- 'id' => 'user_contact_id',
- 'return' => 'email',
- ]),
+ 'id' => 'user_contact_id',
+ 'return' => 'email',
+ ]),
'visibility' => CRM_Utils_Array::makeNonAssociative(CRM_Core_SelectValues::groupVisibility()),
'workflowEnabled' => CRM_Mailing_Info::workflowEnabled(),
'reportIds' => $reportIds,
return $permissions;
}
-
/**
* @inheritDoc
* @return null
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Mailing_MailStore {
- // flag to decide whether to print debug messages
- var $_debug = FALSE;
+ /**
+ * flag to decide whether to print debug messages
+ * @var bool
+ */
+ public $_debug = FALSE;
/**
* Return the proper mail store implementation, based on config settings.
$config = CRM_Core_Config::singleton();
$dir = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $name;
foreach ([
- 'cur',
- 'new',
- 'tmp',
- ] as $sub) {
+ 'cur',
+ 'new',
+ 'tmp',
+ ] as $sub) {
if (!file_exists($dir . DIRECTORY_SEPARATOR . $sub)) {
if ($this->_debug) {
print "creating $dir/$sub\n";
$this->_dir = $dir;
$this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.ignored',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.ignored',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
$this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.processed',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.processed',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
}
/**
$this->_dir = $dir;
$this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.ignored',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.ignored',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
$this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.processed',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.processed',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
}
/**
$parser->options->parseTextAttachmentsAsFiles = TRUE;
foreach ([
- 'cur',
- 'new',
- ] as $subdir) {
+ 'cur',
+ 'new',
+ ] as $subdir) {
$dir = $this->_dir . DIRECTORY_SEPARATOR . $subdir;
foreach (scandir($dir) as $file) {
if ($file == '.' or $file == '..') {
$this->_leftToProcess = count($this->_transport->listMessages());
$this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.ignored',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.ignored',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
$this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.processed',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.processed',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
}
/**
$this->_transport->authenticate($username, $password);
$this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.ignored',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.ignored',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
$this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, [
- 'CiviMail.processed',
- date('Y'),
- date('m'),
- date('d'),
- ]));
+ 'CiviMail.processed',
+ date('Y'),
+ date('m'),
+ date('d'),
+ ]));
}
/**
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* Get BAO Name.
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Mailing_Page_Confirm extends CRM_Core_Page {
+
/**
* @return string
* @throws Exception
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Mailing_Page_Optout extends CRM_Mailing_Page_Common {
+
/**
* Run page.
*
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Mailing_Page_Resubscribe extends CRM_Mailing_Page_Common {
+
/**
* @return string
*/
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
public $_permission = NULL;
public $_contactId = NULL;
/**
* Default component id's, indexed by component type
+ * @var array
*/
private static $defaultComponent;
*/
public static function abWinnerCriteria() {
if (!is_array(self::$abWinnerCriteria)) {
- self::$abWinnerCriteria = [
+ self::$abWinnerCriteria = [
'open' => ts('Open'),
'unique_click' => ts('Total Unique Clicks'),
'link_click' => ts('Total Clicks on a particular link'),
*/
public static function mailingTypes() {
if (!is_array(self::$mailingTypes)) {
- self::$mailingTypes = [
+ self::$mailingTypes = [
'standalone' => ts('Standalone'),
'experiment' => ts('Experimental'),
'winner' => ts('Winner'),
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
protected $_parent;
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* What event type are we browsing?
+ * @var sting
*/
private $_event;
/**
* Should we only count distinct contacts?
+ * @var bool
*/
private $_is_distinct;
/**
* Which mailing are we browsing events from?
+ * @var int
*/
private $_mailing_id;
/**
* Do we want events tied to a specific job?
+ * @var int
*/
private $_job_id;
/**
* For click-through events, do we only want those from a specific url?
+ * @var int
*/
private $_url_id;
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = [
+ public static $_properties = [
'contact_id',
'mailing_id',
'mailing_name',
*/
class CRM_Mailing_Task extends CRM_Core_Task {
- static $objectType = 'mailing';
+ public static $objectType = 'mailing';
/**
* These tasks are the core set of tasks that the user can perform