Skip to content
Snippets Groups Projects
Commit 6e46589d authored by lobo's avatar lobo
Browse files

Merge pull request #520 from dlobo/CRM-12274

CRM-12274
parents de129836 0856e0bb
Branches
Tags
No related merge requests found
......@@ -625,7 +625,9 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
$session = CRM_Core_Session::singleton();
$id = $session->get('userID');
if (!$id) {
$id = $activity->source_contact_id;
$activityContacts = CRM_Core_PseudoConstant::activityContacts('name');
$sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
$id = self::getActivityContact($activity->id. $sourceID);
}
$logParams = array(
'entity_table' => 'civicrm_activity',
......@@ -1698,7 +1700,6 @@ 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]['id'] = $dao->activity_id;
$activities[$dao->activity_id]['activity_type_id'] = $dao->activity_type_id;
$activities[$dao->activity_id]['subject'] = $dao->subject;
......@@ -2168,6 +2169,8 @@ AND cl.modified_id = c.id
// delete activity if there is no record in
// civicrm_activity_contact
// pointing to any other contact record.
// FIXME: this will be an awful query, figure out what function does
// and clean up
$activity = new CRM_Activity_DAO_Activity();
$activity->source_contact_id = $contactId;
$activity->find();
......
......@@ -8,6 +8,7 @@ $params = array(
'participant_id' => 4,
'contribution_id' => 1,
'version' => 3,
'debug' => 1,
);
$result = civicrm_api( 'participant_payment','get',$params );
......@@ -22,6 +23,10 @@ function participant_payment_get_expectedresult(){
$expectedResult = array(
'is_error' => 0,
'undefined_fields' => array(
'0' => 'participant_id',
'1' => 'contribution_id',
),
'version' => 3,
'count' => 1,
'id' => 1,
......@@ -32,6 +37,11 @@ function participant_payment_get_expectedresult(){
'contribution_id' => '1',
),
),
'xdebug' => array(
'peakMemory' => 34740680,
'memory' => 33998960,
'timeIndex' => '79.778831005096',
),
);
return $expectedResult ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment