X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FForm%2FContributionPage.php;h=4ba6b21f85b123e582f97574979d1a19cb4aff0d;hb=ec57bf8741042cc600a7d0daa38b514700fbce88;hp=f1490ee44ceefb1942d03c7d6eed51df9b2b8e00;hpb=f68ee4ec5e94cc51d5e4a6aa9335d913cb497ed6;p=civicrm-core.git diff --git a/CRM/Contribute/Form/ContributionPage.php b/CRM/Contribute/Form/ContributionPage.php index f1490ee44c..4ba6b21f85 100644 --- a/CRM/Contribute/Form/ContributionPage.php +++ b/CRM/Contribute/Form/ContributionPage.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2019 | + | Copyright CiviCRM LLC (c) 2004-2020 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2019 + * @copyright CiviCRM LLC (c) 2004-2020 */ /** @@ -306,7 +306,7 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form { ]; foreach ($pledgeBlock as $key) { $defaults[$key] = CRM_Utils_Array::value($key, $pledgeBlockDefaults); - if ($key == 'pledge_start_date' && CRM_Utils_Array::value($key, $pledgeBlockDefaults)) { + if ($key == 'pledge_start_date' && !empty($pledgeBlockDefaults[$key])) { $defaultPledgeDate = (array) json_decode($pledgeBlockDefaults['pledge_start_date']); $pledgeDateFields = [ 'pledge_calendar_date' => 'calendar_date', @@ -412,6 +412,11 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form { $nextPage = 'thankyou'; break; + case 'Widget': + $subPage = 'widget'; + $nextPage = 'pcp'; + break; + default: $subPage = strtolower($className); $nextPage = strtolower($nextPage);