Skip to content

Commit

Permalink
Merge pull request #16055 from seamuslee001/campaign_sort
Browse files Browse the repository at this point in the history
[REF] Refactor Campaign Search form to use standardised getSortID fun…
  • Loading branch information
eileenmcnaughton authored Dec 9, 2019
2 parents 2d7ad76 + 1fab208 commit 4c0d3f5
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions CRM/Campaign/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ public function preProcess() {
$this->set('force', 0);
}

$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)
);
}

//get the voter clause.
$voterClause = $this->voterClause();

Expand All @@ -135,7 +128,7 @@ public function preProcess() {

$controller = new CRM_Core_Selector_Controller($selector,
$this->get(CRM_Utils_Pager::PAGE_ID),
$sortID,
$this->getSortID(),
CRM_Core_Action::VIEW,
$this,
CRM_Core_Selector_Controller::TRANSFER,
Expand Down Expand Up @@ -260,13 +253,6 @@ public function postProcess() {
return;
}

$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)
);
}

//get the voter clause.
$voterClause = $this->voterClause();

Expand All @@ -288,7 +274,7 @@ public function postProcess() {

$controller = new CRM_Core_Selector_Controller($selector,
$this->get(CRM_Utils_Pager::PAGE_ID),
$sortID,
$this->getSortID(),
CRM_Core_Action::VIEW,
$this,
CRM_Core_Selector_Controller::SESSION,
Expand Down

0 comments on commit 4c0d3f5

Please sign in to comment.