From 590084ae11b21a4e3e54dc41ef742c9e8ac4ebdd Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 9 Dec 2019 14:55:17 +1100 Subject: [PATCH] [REF] Refactor Contact Search form to use standardised getSortID function --- CRM/Contact/Form/Search.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index ade94bddf1..eca29eb4d4 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -727,15 +727,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { * values that potentially change the controller behavior. i.e. things * like totalCount etc */ - $sortID = NULL; - if ($this->get(CRM_Utils_Sort::SORT_ID)) { - $sortID = CRM_Utils_Sort::sortIDValue($this->get(CRM_Utils_Sort::SORT_ID), - $this->get(CRM_Utils_Sort::SORT_DIRECTION) - ); - } $controller = new CRM_Contact_Selector_Controller($selector, $this->get(CRM_Utils_Pager::PAGE_ID), - $sortID, + $this->getSortID(), CRM_Core_Action::VIEW, $this, CRM_Core_Selector_Controller::TRANSFER ); $controller->setEmbedded(TRUE); @@ -855,15 +849,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { } } - $sortID = NULL; - if ($this->get(CRM_Utils_Sort::SORT_ID)) { - $sortID = CRM_Utils_Sort::sortIDValue($this->get(CRM_Utils_Sort::SORT_ID), - $this->get(CRM_Utils_Sort::SORT_DIRECTION) - ); - } $controller = new CRM_Contact_Selector_Controller($selector, $this->get(CRM_Utils_Pager::PAGE_ID), - $sortID, + $this->getSortID(), CRM_Core_Action::VIEW, $this, $output -- 2.25.1