From 2a81202bd6cb4dd9b9750273de55b8d914b50fe5 Mon Sep 17 00:00:00 2001 From: narayanis Date: Wed, 20 May 2015 17:26:42 -0400 Subject: [PATCH] CRM-16090 sort contribution pages by is_active, then title. fix broken 'All' link on pager. --- CRM/Contribute/Page/ContributionPage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index 9e6415ea19..1cc32d9c95 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -405,7 +405,7 @@ AND cp.page_type = 'contribute' $this, FALSE, 0 ); - if ($this->_sortByCharacter == 1 || + if ($this->_sortByCharacter == 'all' || !empty($_POST) ) { $this->_sortByCharacter = ''; @@ -432,6 +432,7 @@ AND cp.page_type = 'contribute' SELECT id FROM civicrm_contribution_page WHERE $whereClause + ORDER BY is_active desc, title asc LIMIT $offset, $rowCount"; $contribPage = CRM_Core_DAO::executeQuery($query, $params, TRUE, 'CRM_Contribute_DAO_ContributionPage'); $contribPageIds = array(); @@ -445,7 +446,7 @@ AND cp.page_type = 'contribute' SELECT * FROM civicrm_contribution_page WHERE $whereClause -ORDER BY title asc +ORDER BY is_active desc, title asc LIMIT $offset, $rowCount"; $dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, 'CRM_Contribute_DAO_ContributionPage'); -- 2.25.1