From 5b7b228cf9dcd4dbf47a7402883a557d79109775 Mon Sep 17 00:00:00 2001 From: kenwest Date: Sat, 14 May 2016 22:17:23 +1000 Subject: [PATCH] CRM-18528 Manage Groups search ignores filters --- CRM/Group/Page/AJAX.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CRM/Group/Page/AJAX.php b/CRM/Group/Page/AJAX.php index c1e6581635..86dedb3639 100644 --- a/CRM/Group/Page/AJAX.php +++ b/CRM/Group/Page/AJAX.php @@ -50,13 +50,19 @@ class CRM_Group_Page_AJAX { CRM_Utils_JSON::output($groups); } else { - $params = CRM_Core_Page_AJAX::defaultSortAndPagerParams(); - - $optionalParameters = array( + $requiredParams = array(); + $optionalParams = array( + 'title' => 'String', + 'created_by' => 'String', + 'group_type' => 'String', + 'visibility' => 'String', + 'status' => 'Integer', 'parentsOnly' => 'Integer', 'showOrgInfo' => 'Boolean', + // Ignore 'parent_id' as that case is handled above ); - $params += CRM_Core_Page_AJAX::validateParams(array(), $optionalParameters); + $params = CRM_Core_Page_AJAX::defaultSortAndPagerParams(); + $params += CRM_Core_Page_AJAX::validateParams($requiredParams, $optionalParams); // get group list $groups = CRM_Contact_BAO_Group::getGroupListSelector($params); -- 2.25.1