projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d2768
)
Simplify getting contact_id from recurring contribution
author
Matthew Wire
<mjw@mjwconsult.co.uk>
Mon, 10 Jan 2022 12:43:08 +0000
(12:43 +0000)
committer
Matthew Wire
<mjw@mjwconsult.co.uk>
Mon, 10 Jan 2022 12:43:18 +0000
(12:43 +0000)
CRM/Core/Payment.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Payment.php
b/CRM/Core/Payment.php
index 16f4691d06e630a79115ec12df758c96b221ccc1..6b599e0bf30563cdbc4ff2e789be9a8ac06dc201 100644
(file)
--- a/
CRM/Core/Payment.php
+++ b/
CRM/Core/Payment.php
@@
-1745,17
+1745,7
@@
abstract class CRM_Core_Payment {
break;
case 'recur':
- $sql = "
- SELECT DISTINCT con.contact_id
- FROM civicrm_contribution_recur rec
-INNER JOIN civicrm_contribution con ON ( con.contribution_recur_id = rec.id )
- WHERE rec.id = %1";
- $contactID = CRM_Core_DAO::singleValueQuery($sql, [
- 1 => [
- $entityID,
- 'Integer',
- ],
- ]);
+ $contactID = CRM_Core_DAO::getFieldValue("CRM_Contribute_DAO_ContributionRecur", $entityID, "contact_id");
$entityArg = 'crid';
break;
}