more cleanup
authoryashodha <yashodha.chaku@webaccess.co.in>
Wed, 24 Apr 2013 17:23:57 +0000 (22:53 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Wed, 24 Apr 2013 17:23:57 +0000 (22:53 +0530)
CRM/Activity/BAO/Activity.php
CRM/Activity/BAO/ActivityAssignment.php

index 400bbee454b3e20ce528c84df8844534be30d35e..d0b215dfd816ead0d4a275cec8a2b076cdfd337b 100644 (file)
@@ -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);
index db7b9873b1df51383f4464dfbcab8a6371162004..fa60cf8ba8aa59856523255034c5f1635b9499db 100644 (file)
@@ -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();
   }