Ensure reports use nested group selector and remove boilerplate
[civicrm-core.git] / CRM / Report / Form / Mailing / Detail.php
index f72ce985384ef5222e4e82b167b0fbfd5d64e9af..8a182c971e36360b9e2f689f5eea6f9f2eb922ec 100644 (file)
@@ -37,6 +37,12 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
 
   protected $_exposeContactID = FALSE;
 
+  /**
+   *
+   */
+  /**
+   *
+   */
   function __construct() {
     $this->_columns = array();
 
@@ -257,21 +263,8 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
       'grouping' => 'contact-fields',
     );
 
-    $this->_columns['civicrm_group'] = array(
-      'dao' => 'CRM_Contact_DAO_Group',
-      'alias' => 'cgroup',
-      'filters' =>
-      array(
-        'gid' =>
-        array(
-          'name' => 'group_id',
-          'title' => ts('Group'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'group' => TRUE,
-          'options' => CRM_Core_PseudoConstant::group(),
-        ),
-      ),
-    );
+    $this->_groupFilter = TRUE;
+    $this->_tagFilter = TRUE;
 
     parent::__construct();
   }
@@ -441,6 +434,9 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
     $this->_where .= " AND {$this->_aliases['civicrm_mailing']}.sms_provider_id IS NULL";
   }
 
+  /**
+   * @return array
+   */
   function mailingList() {
 
     $data    = array();
@@ -455,6 +451,9 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
     return $data;
   }
 
+  /**
+   * @param $rows
+   */
   function alterDisplay(&$rows) {
     // custom code to alter rows
     $entryFound = FALSE;