From 7d793900d45281c7512f34f287dfc16dfdd5386c Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 27 Apr 2015 12:41:57 +0530 Subject: [PATCH] warning fixes --- CRM/Report/Form/Contact/CurrentEmployer.php | 2 +- CRM/Report/Form/Contribute/Detail.php | 2 +- CRM/Report/Form/Contribute/History.php | 2 +- CRM/Report/Form/Contribute/Lybunt.php | 2 +- CRM/Report/Form/Contribute/SoftCredit.php | 2 +- CRM/Report/Form/Contribute/Sybunt.php | 2 +- CRM/Report/Form/Contribute/TopDonor.php | 30 ++++++++++----------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CRM/Report/Form/Contact/CurrentEmployer.php b/CRM/Report/Form/Contact/CurrentEmployer.php index 394a0c26f8..b0160edc4d 100644 --- a/CRM/Report/Form/Contact/CurrentEmployer.php +++ b/CRM/Report/Form/Contact/CurrentEmployer.php @@ -115,7 +115,7 @@ class CRM_Report_Form_Contact_CurrentEmployer extends CRM_Report_Form { 'sort_name' => array('title' => ts('Employee Name')), 'source' => array( 'title' => ts('Contact Source'), - 'type' => CRM_Utils_Type::T_STRING, + 'type' => CRM_Utils_Type::T_STRING, ), 'id' => array( 'title' => ts('Contact ID'), diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index f4413d26ad..72f848fc51 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -45,7 +45,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); /** diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index 292b973219..119cbeeca2 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -43,7 +43,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); protected $_referenceYear = array( diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index c5c223e02a..8cac2d775f 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -43,7 +43,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report'); diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 6ed97b2efa..87bdce7bbe 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -47,7 +47,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report'); diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index 17edcabaae..e214895f7b 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -43,7 +43,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report'); diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index a100afd5ce..1f2a4c0dc9 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -38,7 +38,7 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { protected $_customGroupExtends = array( 'Contact', 'Individual', - 'Contribution' + 'Contribution', ); public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report'); @@ -491,23 +491,23 @@ ORDER BY civicrm_contribution_total_amount_sum DESC } $entryFound = $this->alterDisplayAddressFields($row, $rows, $rowNum, 'contribute/detail', 'List all contribution(s)') ? TRUE : $entryFound; - //handle gender - if (array_key_exists('civicrm_contact_gender_id', $row)) { - if ($value = $row['civicrm_contact_gender_id']) { - $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'); - $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value]; + //handle gender + if (array_key_exists('civicrm_contact_gender_id', $row)) { + if ($value = $row['civicrm_contact_gender_id']) { + $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'); + $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value]; + } + $entryFound = TRUE; } - $entryFound = TRUE; - } - // display birthday in the configured custom format - if (array_key_exists('civicrm_contact_birth_date', $row)) { - $birthDate = $row['civicrm_contact_birth_date']; - if ($birthDate) { - $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d'); + // display birthday in the configured custom format + if (array_key_exists('civicrm_contact_birth_date', $row)) { + $birthDate = $row['civicrm_contact_birth_date']; + if ($birthDate) { + $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d'); + } + $entryFound = TRUE; } - $entryFound = TRUE; - } // skip looking further in rows, if first row itself doesn't // have the column we need -- 2.25.1