From 1b67821f6ccf19b7cb2dd3f2d82dacf203839352 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Sun, 24 Feb 2019 14:19:57 +1300 Subject: [PATCH] Minor code cleanup This is a reviewer's commit of https://github.com/civicrm/civicrm-core/pull/13672 I pulled out some lines I've checked & agree with to simplify that commit --- CRM/Case/Form/Activity.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index b027243ff4..7a7b3b92b6 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -70,7 +70,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { $this->_crmDir = 'Case'; $this->assign('context', $this->_context); - $result = parent::preProcess(); + parent::preProcess(); $scheduleStatusId = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_status_id', 'Scheduled'); $this->assign('scheduleStatusId', $scheduleStatusId); @@ -573,7 +573,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { unset($caseParams['subject'], $caseParams['details'], $caseParams['status_id'], $caseParams['custom'] ); - $case = CRM_Case_BAO_Case::create($caseParams); + CRM_Case_BAO_Case::create($caseParams); // create case activity record $caseParams = array( 'activity_id' => $vval['actId'], @@ -582,10 +582,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { CRM_Case_BAO_Case::processCaseActivity($caseParams); } - // Insert civicrm_log record for the activity (e.g. store the - // created / edited by contact id and date for the activity) - // Note - civicrm_log is already created by CRM_Activity_BAO_Activity::create() - // send copy to selected contacts. $mailStatus = ''; $mailToContacts = array(); @@ -593,8 +589,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { //CRM-5695 //check for notification settings for assignee contacts $selectedContacts = array('contact_check'); - $activityContacts = CRM_Activity_BAO_ActivityContact::buildOptions('record_type_id', 'validate'); - $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); if (Civi::settings()->get('activity_assignee_notification')) { $selectedContacts[] = 'assignee_contact_id'; } -- 2.25.1