Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395645 )

Change subject: Remove major-gifts specific dedupe code.
......................................................................

Remove major-gifts specific dedupe code.

I struggled to make myself do this as I seem to believe it will be back in some 
form
However, trying to convince myself to 'trust in git'. Have put as a separate 
patch
for easier retrieval...

Bug: T181088
Change-Id: Id89df916d7e1e865547eb285d6a78c9fe44e95be
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/45/395645/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 6e07755..d1c525d 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2483,9 +2483,6 @@
   }
 
   if (substr($moveField, 0, 13) === 'move_location') {
-    if (!isset($refs['is_major_gift'])) {
-      $refs['is_major_gift'] = 
_wmf_civicrm_is_merged_contact_major_donor($mainId, $otherId);
-    }
     $fieldParts = explode('_', $moveField);
 
     if ($fieldParts[2] == 'email') {
@@ -2958,28 +2955,6 @@
  */
 function _wmf_civicrm_count_capital_letters($string) {
   return strlen(preg_replace('/[^A-Z]+/', '', $string));
-}
-
-/**
- * Has the combined contact given $500 or more?
- *
- * @param int $mainId
- * @param int $otherId
- *
- * @return bool
- *
- * @throws \CiviCRM_API3_Exception
- */
-function _wmf_civicrm_is_merged_contact_major_donor($mainId, $otherId) {
-  $total = 0;
-  $donations = civicrm_api3('Contribution', 'get', array(
-    'return' => 'total_amount',
-    'contact_id' => array('IN' => array($mainId, $otherId)),
-  ));
-  foreach ($donations['values'] as $donation) {
-    $total += $donation['total_amount'];
-  }
-  return ($total >= 500) ? TRUE : FALSE;
 }
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/395645
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id89df916d7e1e865547eb285d6a78c9fe44e95be
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to