X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FPage%2FContributionPage.php;h=55b3b9a463b2d07b7cc7ce806c64fb97ee4b9c8f;hb=e01f2d31486eec238a7ef4db0c7b4ddc5a9d09b8;hp=0f9f8df41a68c4bda3cbea3ad3be835572a9b77c;hpb=5caa4dab191ace09ee6fac30a11609ec6d4c7ddf;p=civicrm-core.git diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index 0f9f8df41a..55b3b9a463 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -247,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', ), ); @@ -384,9 +384,18 @@ AND cp.page_type = 'contribute' $this, TRUE, 0, 'GET' ); - CRM_Contribute_BAO_ContributionPage::copy($gid); + $copy = CRM_Contribute_BAO_ContributionPage::copy($gid); - CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1')); + $urlString = CRM_Utils_System::currentPath(); + $urlParams = 'reset=1'; + + // Redirect to copied contribution page + if ($copy->id) { + $urlString = 'civicrm/admin/contribute/settings'; + $urlParams .= '&action=update&id=' . $copy->id; + } + + CRM_Utils_System::redirect(CRM_Utils_System::url($urlString, $urlParams)); } /**