From 900e68292fec8b96662f73443759fc2e60725faf Mon Sep 17 00:00:00 2001 From: jake-mw Date: Wed, 16 Apr 2014 23:40:57 -0400 Subject: [PATCH] CRM-14472 - when returning getPCPList(), query correct table for contribution-type vs. event-type PCPs ---------------------------------------- * CRM-14472: Credit offline contribution to an event PCP https://issues.civicrm.org/jira/browse/CRM-14472 --- CRM/Contact/Page/AJAX.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 7bf572f408..0eec113c8b 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -227,7 +227,12 @@ class CRM_Contact_Page_AJAX { SELECT pcp.id as id, CONCAT_WS( ' :: ', {$select} ) as data, sort_name FROM civicrm_pcp pcp, civicrm_contribution_page cp, civicrm_contact cc {$includeEmailFrom} - {$whereClause} + {$whereClause} AND pcp.page_type = 'contribute' + UNION ALL + SELECT pcp.id as id, CONCAT_WS( ' :: ', {$select} ) as data, sort_name + FROM civicrm_pcp pcp, civicrm_event cp, civicrm_contact cc + {$includeEmailFrom} + {$whereClause} AND pcp.page_type = 'event' LIMIT 0, {$limit} ) t ORDER BY sort_name -- 2.25.1