$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',
$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;
// 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();
'participant_id' => 4,
'contribution_id' => 1,
'version' => 3,
+ 'debug' => 1,
);
$result = civicrm_api( 'participant_payment','get',$params );
$expectedResult = array(
'is_error' => 0,
+ 'undefined_fields' => array(
+ '0' => 'participant_id',
+ '1' => 'contribution_id',
+ ),
'version' => 3,
'count' => 1,
'id' => 1,
'contribution_id' => '1',
),
),
+ 'xdebug' => array(
+ 'peakMemory' => 31758384,
+ 'memory' => 31463600,
+ 'timeIndex' => '45.313442230225',
+ ),
);
return $expectedResult ;
'participant_id' => $this->_participantID4,
'contribution_id' => $contributionID,
'version' => $this->_apiversion,
+ 'debug' => 1,
);
$result = civicrm_api('participant_payment', 'get', $params);