dev/core#1059 Replace deprecated start and end url params with receive_date_low and...
[civicrm-core.git] / CRM / Contribute / Page / ContributionPage.php
index 81a0521cc6b46c8c46ea83220d248d3084db4010..826c4f06788f31c0668be08f3683a783df5f959c 100644 (file)
@@ -215,7 +215,8 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page {
           'title' => ts('Test-drive'),
           'url' => $urlString,
           'qs' => $urlParams . '&action=preview',
-          'fe' => TRUE, // Addresses https://lab.civicrm.org/dev/core/issues/658
+          // Addresses https://lab.civicrm.org/dev/core/issues/658
+          'fe' => TRUE,
           'uniqueName' => 'test_drive',
         ),
       );
@@ -246,21 +247,21 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page {
           'name' => ts('Current Month-To-Date'),
           'title' => ts('Current Month-To-Date'),
           'url' => $urlString,
-          'qs' => "{$urlParams}&start={$monthDate}&end={$now}",
+          'qs' => "{$urlParams}&receive_date_low={$monthDate}&receive_date_high={$now}",
           'uniqueName' => 'current_month_to_date',
         ),
         CRM_Core_Action::REVERT => array(
           'name' => ts('Fiscal Year-To-Date'),
           'title' => ts('Fiscal Year-To-Date'),
           'url' => $urlString,
-          'qs' => "{$urlParams}&start={$yearDate}&end={$yearNow}",
+          'qs' => "{$urlParams}&receive_date_low={$yearDate}&receive_date_high={$yearNow}",
           'uniqueName' => 'fiscal_year_to_date',
         ),
         CRM_Core_Action::BROWSE => array(
           'name' => ts('Cumulative'),
           'title' => ts('Cumulative'),
           'url' => $urlString,
-          'qs' => "{$urlParams}&start=&end=$now",
+          'qs' => "{$urlParams}&receive_date_low=&receive_date_high=$now",
           'uniqueName' => 'cumulative',
         ),
       );
@@ -420,8 +421,10 @@ AND         cp.page_type = 'contribute'
     $params = array();
 
     $whereClause = $this->whereClause($params, FALSE);
-    $this->pagerAToZ($whereClause, $params);
-
+    $config = CRM_Core_Config::singleton();
+    if ($config->includeAlphabeticalPager) {
+      $this->pagerAToZ($whereClause, $params);
+    }
     $params = array();
     $whereClause = $this->whereClause($params, TRUE);
     $this->pager($whereClause, $params);