From: yashodha Date: Tue, 23 Apr 2013 21:00:05 +0000 (+0530) Subject: CRM-12274 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb873b6eba3e9364ddd814f9ab3de9fae052e45d;p=civicrm-core.git CRM-12274 --- diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index b5028c7f7b..a9ddc03677 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -102,7 +102,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $defaults['assignee_contact'] = CRM_Activity_BAO_ActivityContact::retrieveContactIdsByActivityId($activity->id, $assigneeID); $assignee_contact_names = CRM_Activity_BAO_ActivityContact::getNames($activity->id, $assigneeID); $defaults['assignee_contact_value'] = implode('; ', $assignee_contact_names); - + $sourceContactId = self::getActivityContact($activity->id, $sourceID); if ($activity->activity_type_id != CRM_Core_OptionGroup::getValue('activity_type', 'Bulk Email', 'name')) { $defaults['target_contact'] = CRM_Activity_BAO_ActivityContact::retrieveContactIdsByActivityId($activity->id, $targetID); $target_contact_names = CRM_Activity_BAO_ActivityContact::getNames($activity->id, $targetID); @@ -114,7 +114,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { ) ) { $defaults['mailingId'] = CRM_Utils_System::url('civicrm/mailing/report', - "mid={$activity->source_record_id}&reset=1&atype={$activity->activity_type_id}&aid={$activity->id}&cid={$activity->source_contact_id}&context=activity" + "mid={$activity->source_record_id}&reset=1&atype={$activity->activity_type_id}&aid={$activity->id}&cid={$sourceContactId}&context=activity" ); } else { @@ -533,23 +533,23 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { ); } else { - $q = "action=view&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$activity->source_contact_id}&context=home"; + $q = "action=view&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$params['source_contact_id']}&context=home"; if ($activity->activity_type_id != CRM_Core_OptionGroup::getValue('activity_type', 'Email', 'name')) { $url = CRM_Utils_System::url('civicrm/activity', $q); if ($activity->activity_type_id == CRM_Core_OptionGroup::getValue('activity_type', 'Print PDF Letter', 'name')) { $recentOther['editUrl'] = CRM_Utils_System::url('civicrm/activity/pdf/add', - "action=update&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$activity->source_contact_id}&context=home" + "action=update&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$params['source_contact_id']}&context=home" ); } else { $recentOther['editUrl'] = CRM_Utils_System::url('civicrm/activity/add', - "action=update&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$activity->source_contact_id}&context=home" + "action=update&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$params['source_contact_id']}&context=home" ); } if (CRM_Core_Permission::check("delete activities")) { $recentOther['deleteUrl'] = CRM_Utils_System::url('civicrm/activity', - "action=delete&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$activity->source_contact_id}&context=home" + "action=delete&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$params['source_contact_id']}&context=home" ); } } @@ -557,7 +557,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $url = CRM_Utils_System::url('civicrm/activity/view', $q); if (CRM_Core_Permission::check('delete activities')) { $recentOther['deleteUrl'] = CRM_Utils_System::url('civicrm/activity', - "action=delete&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$activity->source_contact_id}&context=home" + "action=delete&reset=1&id={$activity->id}&atype={$activity->activity_type_id}&cid={$params['source_contact_id']}&context=home" ); } } @@ -1696,7 +1696,7 @@ WHERE activity.id IN ($activityIds)"; $activityStatuses = CRM_Core_OptionGroup::values('activity_status'); while ($dao->fetch()) { - $activities[$dao->activity_id]['source_contact_id'] = $dao->source_contact_id; + //$activities[$dao->activity_id]['source_contact_id'] = $dao->source_contact_id; $activities[$dao->activity_id]['id'] = $dao->activity_id; $activities[$dao->activity_id]['activity_type_id'] = $dao->activity_type_id; $activities[$dao->activity_id]['subject'] = $dao->subject;