<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 5 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
+ | Copyright CiviCRM LLC. All rights reserved. |
| |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
*/
/**
/**
* Maximum Activities that should be allowed to update.
+ * @var int
*/
protected $_maxActivities = 100;
/**
* Variable to store redirect path.
+ * @var int
*/
protected $_userContext;
/**
* Variable to store contact Ids.
+ * @var array
*/
public $_contacts;
$validate = FALSE;
//validations
if (count($this->_activityHolderIds) > $this->_maxActivities) {
- CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select to send an email is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(
+ CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select to send an email is %1. You have selected %2. Please select fewer Activities from your search results and try again.", [
1 => $this->_maxActivities,
2 => count($this->_activityHolderIds),
- )), ts("Maximum Exceeded"), "error");
+ ]), ts("Maximum Exceeded"), "error");
$validate = TRUE;
}
// then redirect
$this->addElement('checkbox', 'with_contact', ts('With Contact'));
$this->addElement('checkbox', 'assigned_to', ts('Assigned to Contact'));
$this->addElement('checkbox', 'created_by', ts('Created by'));
- $this->setDefaults(array('with_contact' => 1));
+ $this->setDefaults(['with_contact' => 1]);
$this->addDefaultButtons(ts('Continue'));
}
* Add local and global form rules.
*/
public function addRules() {
- $this->addFormRule(array('CRM_Activity_Form_Task_PickOption', 'formRule'));
+ $this->addFormRule(['CRM_Activity_Form_Task_PickOption', 'formRule']);
}
/**
!isset($fields['assigned_to']) &&
!isset($fields['created_by'])
) {
- return array('with_contact' => ts('You must select at least one email recipient type.'));
+ return ['with_contact' => ts('You must select at least one email recipient type.')];
}
return TRUE;
}
// Clear any formRule errors from Email form in case they came back here via Cancel button
$this->controller->resetPage('Email');
$params = $this->exportValues();
- $this->_contacts = array();
+ $this->_contacts = [];
$activityContacts = CRM_Activity_BAO_ActivityContact::buildOptions('record_type_id', 'validate');
$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);