From: yashodha Date: Wed, 24 Apr 2013 17:23:57 +0000 (+0530) Subject: more cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cc1c86e92efe1790e38aa49a31ce527b314df4b6;p=civicrm-core.git more cleanup --- 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(); }