From 9c6a892eee804a75cc7eafa9a8708fde875af6ea Mon Sep 17 00:00:00 2001 From: yashodha Date: Mon, 24 Jan 2022 10:55:35 +0530 Subject: [PATCH] report cleanup --- CRM/Report/Form/Contact/Relationship.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/CRM/Report/Form/Contact/Relationship.php b/CRM/Report/Form/Contact/Relationship.php index d251cdf6e5..6db13e2822 100644 --- a/CRM/Report/Form/Contact/Relationship.php +++ b/CRM/Report/Form/Contact/Relationship.php @@ -414,11 +414,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { // Include Email Field. if ($this->_emailField_a) { - $this->_from .= " - LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']} - ON ( {$this->_aliases['civicrm_contact']}.id = - {$this->_aliases['civicrm_email']}.contact_id AND - {$this->_aliases['civicrm_email']}.is_primary = 1 )"; + $this->joinEmailFromContact(); } if ($this->_emailField_b) { $this->_from .= " @@ -429,11 +425,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { } // Include Phone Field. if ($this->_phoneField_a) { - $this->_from .= " - LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']} - ON ( {$this->_aliases['civicrm_contact']}.id = - {$this->_aliases['civicrm_phone']}.contact_id AND - {$this->_aliases['civicrm_phone']}.is_primary = 1 )"; + $this->joinPhoneFromContact(); } if ($this->_phoneField_b) { $this->_from .= " -- 2.25.1