dev/core#1482 Remove lines of code that appear to relate to legacy logic
authoreileen <emcnaughton@wikimedia.org>
Thu, 19 Dec 2019 22:14:38 +0000 (11:14 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 19 Dec 2019 22:14:38 +0000 (11:14 +1300)
As discussed in https://lab.civicrm.org/dev/core/issues/1482 the subscription history table appears to still be used for
recording group history but this business of creating a row with no attached group appears to be from a logic flow that
is long-superceded by change log & db logging

CRM/Contact/BAO/Contact.php

index 644b3656839940088537c855bdd7893162eca965..54009a2bd38c52ee2434e591f9ba6f7a50dafd9d 100644 (file)
@@ -393,16 +393,6 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
       CRM_Core_BAO_CustomValueTable::store($params['custom'], 'civicrm_contact', $contact->id);
     }
 
-    // make a civicrm_subscription_history entry only on contact create (CRM-777)
-    if (empty($params['contact_id'])) {
-      $subscriptionParams = [
-        'contact_id' => $contact->id,
-        'status' => 'Added',
-        'method' => 'Admin',
-      ];
-      CRM_Contact_BAO_SubscriptionHistory::create($subscriptionParams);
-    }
-
     $transaction->commit();
 
     // CRM-6367: fetch the right label for contact type’s display