Skip to content

Commit

Permalink
Merge pull request #9952 from JMAConsulting/CRM-20025
Browse files Browse the repository at this point in the history
CRM-20025 [ready for review] Prevented query from fetching contacts without contributions
  • Loading branch information
eileenmcnaughton authored Mar 10, 2017
2 parents 9a9258a + 593e0d0 commit d4033f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CRM/Contribute/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@ public static function preProcessCommon(&$form, $useTable = FALSE) {
}
else {
$queryParams = $form->get('queryParams');
$isTest = FALSE;
foreach ($queryParams as $fields) {
if ($fields[0] == 'contribution_test') {
$isTest = TRUE;
break;
}
}
if (!$isTest) {
$queryParams[] = array(
'contribution_test',
'=',
0,
0,
0,
);
}
$returnProperties = array('contribution_id' => 1);
$sortOrder = $sortCol = NULL;
if ($form->get(CRM_Utils_Sort::SORT_ORDER)) {
Expand Down

0 comments on commit d4033f9

Please sign in to comment.