From: narayanis Date: Wed, 20 May 2015 21:26:42 +0000 (-0400) Subject: CRM-16090 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2a81202bd6cb4dd9b9750273de55b8d914b50fe5;p=civicrm-core.git CRM-16090 sort contribution pages by is_active, then title. fix broken 'All' link on pager. --- 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');