CRM-14656 - Add contact ID A and B and relationship ID to Relationship report, and...
[civicrm-core.git] / CRM / Report / Form / Contact / Summary.php
index 83acddd707cedb0731a3931bd04488948c3d0c28..2132662f51c512f17fb9cc2e68b289ade2712cbe 100644 (file)
@@ -2,9 +2,9 @@
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -29,7 +29,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -78,6 +78,10 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form {
           array(
             'title' => ts('Contact SubType'),
           ),
+          'birth_date' =>
+          array(
+            'title' => ts('Birth Date'),
+          ),
         ),
         'filters' =>
         array(
@@ -91,6 +95,11 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form {
           array('title' => ts('Contact ID'),
             'no_display' => TRUE,
           ),
+          'birth_date' =>
+          array(
+            'title' => ts('Birth Date'),
+            'operatorType' => CRM_Report_Form::OP_DATE,
+          ),
         ),
         'grouping' => 'contact-fields',
         'order_bys' =>
@@ -213,9 +222,7 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form {
     foreach ($this->_columns as $tableName => $table) {
       if (array_key_exists('fields', $table)) {
         foreach ($table['fields'] as $fieldName => $field) {
-          if (CRM_Utils_Array::value('required', $field) ||
-            CRM_Utils_Array::value($fieldName, $this->_params['fields'])
-          ) {
+          if (!empty($field['required']) || !empty($this->_params['fields'][$fieldName])) {
             if ($tableName == 'civicrm_email') {
               $this->_emailField = TRUE;
             }