Fix undeclared variables in custom activity search
authorColeman Watts <coleman@civicrm.org>
Fri, 3 Jun 2016 21:28:37 +0000 (15:28 -0600)
committerColeman Watts <coleman@civicrm.org>
Fri, 3 Jun 2016 21:28:37 +0000 (15:28 -0600)
CRM/Contact/Form/Search/Custom/ActivitySearch.php
CRM/Core/BAO/CustomGroup.php

index d7b8ba87fc93c591e32fdcdb083a0caf8d96dcbd..ff5bd53846228de9b31f06b6e9a8077dd2e7c8d2 100644 (file)
@@ -70,12 +70,10 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
     );
 
     //Add custom fields to columns array for inclusion in export
-    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $form, NULL,
-      NULL, '', NULL
-    );
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity');
 
     //use simplified formatted groupTree
-    $groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, 1, $form);
+    $groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree);
 
     //cycle through custom fields and assign to _columns array
     foreach ($groupTree as $key) {
@@ -84,7 +82,6 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
         $this->_columns[$fieldlabel] = $field['column_name'];
       }
     }
-    //end custom fields
   }
 
   /**
@@ -204,7 +201,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
     }
 
     // add custom group fields to SELECT and FROM clause
-    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $form, NULL, NULL, '', NULL);
+    $groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this);
 
     foreach ($groupTree as $key) {
       if (!empty($key['extends']) && $key['extends'] == 'Activity') {
index 0a9b3e78bc6d607891b7738cf398dd56aa12967a..1c21f8f8936f991efba5459a76a4cd43c9a509de 100644 (file)
@@ -1821,7 +1821,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1,
    *
    * @return array
    */
-  public static function formatGroupTree(&$groupTree, $groupCount = 1, &$form) {
+  public static function formatGroupTree(&$groupTree, $groupCount = 1, &$form = NULL) {
     $formattedGroupTree = array();
     $uploadNames = array();