From: kenwest Date: Sat, 14 May 2016 12:17:23 +0000 (+1000) Subject: CRM-18528 Manage Groups search ignores filters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5b7b228cf9dcd4dbf47a7402883a557d79109775;p=civicrm-core.git CRM-18528 Manage Groups search ignores filters --- 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);