From cc1c86e92efe1790e38aa49a31ce527b314df4b6 Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 24 Apr 2013 22:53:57 +0530 Subject: [PATCH] more cleanup --- CRM/Activity/BAO/Activity.php | 2 +- CRM/Activity/BAO/ActivityAssignment.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 400bbee454..d0b215dfd8 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -397,7 +397,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $assignmentParams['contact_id'] = $params['assignee_contact_id']; $assignmentParams['record_type_id'] = $assigneeID; if (CRM_Utils_Array::value('id', $params)) { - $assignment = new CRM_Activity_BAO_ActivityAssignment(); + $assignment = new CRM_Activity_BAO_ActivityContact(); $assignment->activity_id = $activityId; $assignment->record_type_id = $assigneeID; $assignment->find(TRUE); diff --git a/CRM/Activity/BAO/ActivityAssignment.php b/CRM/Activity/BAO/ActivityAssignment.php index db7b9873b1..fa60cf8ba8 100644 --- a/CRM/Activity/BAO/ActivityAssignment.php +++ b/CRM/Activity/BAO/ActivityAssignment.php @@ -57,15 +57,13 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta * */ public static function create(&$params) { - $assignment = new CRM_Activity_BAO_ActivityAssignment(); + $assignment = new CRM_Activity_BAO_ActivityContact(); $activityContacts = CRM_Core_PseudoConstant::activityContacts('name'); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); $assignment->copyValues($params); $assignment->record_type_id = $assigneeID; - if (isset($assignment->assignee_contact_id)) { - $assignment->contact_id = $assignment->assignee_contact_id; - } + return $assignment->save(); } -- 2.25.1