From: yashodha Date: Mon, 28 Dec 2015 10:07:26 +0000 (+0530) Subject: CRM-17755: Nesting of operators for event search form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=790b377782296a1e19a7179878475b1261f90619;p=civicrm-core.git CRM-17755: Nesting of operators for event search form ---------------------------------------- * CRM-17755: Nesting of operators for event search form https://issues.civicrm.org/jira/browse/CRM-17755 --- diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 92b7aea6c2..6fbf40a321 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -423,11 +423,10 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { elseif (is_numeric($status)) { $statusTypes = (int) $status; } - - $this->_formValues['participant_status_id'] = is_array($statusTypes) ? array('IN' => array_keys($statusTypes)) : $statusTypes; - } - elseif ($statusTypes = CRM_Utils_Array::value('participant_status_id', $this->_formValues)) { - $this->_formValues['participant_status_id'] = is_array($statusTypes) ? array('IN' => $statusTypes) : $statusTypes; + elseif (is_array($status) && !array_key_exists('IN', $status)) { + $statusTypes = array_keys($status); + } + $this->_formValues['participant_status_id'] = is_array($statusTypes) ? array_keys($statusTypes) : $statusTypes; } $role = CRM_Utils_Request::retrieve('role', 'String',