+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
*/
public function edit() {
// used for ajax tabs
- $context = CRM_Utils_Request::retrieve('context', 'String', $this);
+ $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this);
$this->assign('context', $context);
$this->_id = CRM_Utils_Request::retrieve('id', 'Integer', $this);
switch ($activityTypeId) {
case $emailTypeValue:
$wrapper = new CRM_Utils_Wrapper();
- $arguments = array('attachUpload' => 1);
+ $arguments = ['attachUpload' => 1];
return $wrapper->run('CRM_Contact_Form_Task_Email', ts('Email a Contact'), $arguments);
case $letterTypeValue:
$wrapper = new CRM_Utils_Wrapper();
- $arguments = array('attachUpload' => 1);
+ $arguments = ['attachUpload' => 1];
return $wrapper->run('CRM_Contact_Form_Task_PDF', ts('Create PDF Letter'), $arguments);
default:
* Perform actions and display for activities.
*/
public function run() {
- $context = CRM_Utils_Request::retrieve('context', 'String', $this);
+ $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this);
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
$action = CRM_Utils_Request::retrieve('action', 'String', $this);
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
// Do check for view/edit operation.
if ($this->_id &&
- in_array($action, array(CRM_Core_Action::UPDATE, CRM_Core_Action::VIEW))
+ in_array($action, [CRM_Core_Action::UPDATE, CRM_Core_Action::VIEW])
) {
if (!CRM_Activity_BAO_Activity::checkPermission($this->_id, $action)) {
CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
'Print PDF Letter'
);
- if (in_array($activityTypeId, array(
+ if (in_array($activityTypeId, [
$emailTypeValue,
$letterTypeValue,
- ))) {
+ ])) {
return;
}
}