X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FRegistration.php;h=e20c5d5c3d9d22b9e59e4bba9fc3fc0dc3e0cb88;hb=90ab56f1f5846707ad5a5fdb0cb6741e4d6a13a2;hp=6e0af9256012e0111bced3628e6874474f202334;hpb=ddf6f55ab20a40bf0fc4f04e51808897e41f9fb7;p=civicrm-core.git diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 6e0af92560..e20c5d5c3d 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -231,8 +231,6 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { $params = ['id' => $this->_eventId]; CRM_Event_BAO_Event::retrieve($params, $this->_values['event']); - CRM_Event_BAO_Event::setOutputTimeZone($this->_values['event'], $this->_values['event']['event_tz']); - // check for is_monetary status $isMonetary = $this->_values['event']['is_monetary'] ?? NULL; // check for ability to add contributions of type @@ -458,7 +456,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { $this->assign('address', CRM_Utils_Address::getFormattedBillingAddressFieldsFromParameters($params, $this->_bltID)); // The concept of contributeMode is deprecated. - if ($this->_contributeMode == 'direct' && empty($params['is_pay_later'])) { + if ($this->_contributeMode === 'direct' && empty($params['is_pay_later'])) { $date = CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $params)); $date = CRM_Utils_Date::mysqlToIso($date); $this->assign('credit_card_exp_date', $date); @@ -467,18 +465,12 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { ); } - // assign is_email_confirm to templates - if (isset($this->_values['event']['is_email_confirm'])) { - $this->assign('is_email_confirm', $this->_values['event']['is_email_confirm']); - } - + $this->assign('is_email_confirm', $this->_values['event']['is_email_confirm'] ?? NULL); // assign pay later stuff - $params['is_pay_later'] = CRM_Utils_Array::value('is_pay_later', $params, FALSE); + $params['is_pay_later'] = $params['is_pay_later'] ?? FALSE; $this->assign('is_pay_later', $params['is_pay_later']); - if ($params['is_pay_later']) { - $this->assign('pay_later_text', $this->getPayLaterLabel()); - $this->assign('pay_later_receipt', $this->_values['event']['pay_later_receipt']); - } + $this->assign('pay_later_text', $params['is_pay_later'] ? $this->getPayLaterLabel() : FALSE); + $this->assign('pay_later_receipt', $params['is_pay_later'] ? $this->_values['event']['pay_later_receipt'] : NULL); // also assign all participantIDs to the template // useful in generating confirmation numbers if needed @@ -1547,8 +1539,8 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { //lets get additional participant id to cancel. if ($this->_allowConfirmation && is_array($cancelledIds)) { - $additonalId = $value['participant_id'] ?? NULL; - if ($additonalId && $key = array_search($additonalId, $cancelledIds)) { + $additionalId = $value['participant_id'] ?? NULL; + if ($additionalId && $key = array_search($additionalId, $cancelledIds)) { unset($cancelledIds[$key]); } }