X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FReport%2FForm%2FContact%2FSummary.php;h=706d992981e52f120090e9a79d064a5a987d5f4f;hb=5e71b14394f241b63b4978e7702be23cfcb307a5;hp=e3cc8bfea1b8118e4e55257f284961b533529a5e;hpb=d2b59588cf376597b2c2a16fd57f4722216955cd;p=civicrm-core.git diff --git a/CRM/Report/Form/Contact/Summary.php b/CRM/Report/Form/Contact/Summary.php index e3cc8bfea1..706d992981 100644 --- a/CRM/Report/Form/Contact/Summary.php +++ b/CRM/Report/Form/Contact/Summary.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2016 | + | Copyright CiviCRM LLC (c) 2004-2018 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2016 + * @copyright CiviCRM LLC (c) 2004-2018 */ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form { @@ -151,15 +151,6 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form { if (!empty($field['required']) || !empty($this->_params['fields'][$fieldName]) ) { - if ($tableName == 'civicrm_email') { - $this->_emailField = TRUE; - } - elseif ($tableName == 'civicrm_phone') { - $this->_phoneField = TRUE; - } - elseif ($tableName == 'civicrm_country') { - $this->_countryField = TRUE; - } $alias = "{$tableName}_{$fieldName}"; $select[] = "{$field['dbAlias']} as {$alias}"; @@ -192,27 +183,9 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form { LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id AND {$this->_aliases['civicrm_address']}.is_primary = 1 ) "; - - if ($this->isTableSelected('civicrm_email')) { - $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) "; - } - - if ($this->_phoneField) { - $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 "; - } - - if ($this->isTableSelected('civicrm_country')) { - $this->_from .= " - LEFT JOIN civicrm_country {$this->_aliases['civicrm_country']} - ON {$this->_aliases['civicrm_address']}.country_id = {$this->_aliases['civicrm_country']}.id AND - {$this->_aliases['civicrm_address']}.is_primary = 1 "; - } + $this->joinPhoneFromContact(); + $this->joinEmailFromContact(); + $this->joinCountryFromAddress(); } public function postProcess() { @@ -255,7 +228,7 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form { $this->_absoluteUrl, $this->_id, $this->_drilldownReport ); $rows[$rowNum]['civicrm_contact_sort_name_link'] = $url; - $rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts("View Constituent Detail Report for this contact."); + $rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts('View Contact Detail Report for this contact'); $entryFound = TRUE; }