From 602e715726e6dfb3e00df744b88edfb2a87f400b Mon Sep 17 00:00:00 2001 From: mickadoo Date: Tue, 6 Jun 2017 10:28:57 +0100 Subject: [PATCH] CRM-20687: Invert logic and rename variable to remove issue reference --- Civi/API/Subscriber/ChainSubscriber.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Civi/API/Subscriber/ChainSubscriber.php b/Civi/API/Subscriber/ChainSubscriber.php index 663eee14f3..de15a781de 100644 --- a/Civi/API/Subscriber/ChainSubscriber.php +++ b/Civi/API/Subscriber/ChainSubscriber.php @@ -150,7 +150,7 @@ class ChainSubscriber implements EventSubscriberInterface { $subParams['entity_table'] = 'civicrm_' . $lowercase_entity; } - $crm16084 = FALSE; + $addEntityId = TRUE; if ($subEntity == 'relationship' && $lowercase_entity == 'contact') { // if a relationship call is chained to a contact call, we need // to check whether contact_id_a or contact_id_b for the @@ -159,12 +159,12 @@ class ChainSubscriber implements EventSubscriberInterface { // See CRM-16084. foreach (array_keys($newparams) as $key) { if (substr($key, 0, 11) == 'contact_id_') { - $crm16084 = TRUE; + $addEntityId = FALSE; break; } } } - if (!$crm16084) { + if ($addEntityId) { $subParams[$lowercase_entity . "_id"] = $parentAPIValues['id']; } } -- 2.25.1