From d0ebccea0ea8a37bf7ffb85d76e3d2f87e7620fa Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Thu, 12 Feb 2015 15:16:20 +0530 Subject: [PATCH] CRM-5039 Test Build Fixes Continued ---------------------------------------- * CRM-5039: Events don't always limit registrations to "max participants" setting https://issues.civicrm.org/jira/browse/CRM-5039 --- CRM/Event/Form/Registration.php | 2 +- CRM/Event/Form/Registration/Register.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index b3712698d4..407b1a632c 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -1245,7 +1245,7 @@ WHERE v.option_group_id = g.id $value = $element->getValue(); if (in_array($value[0], $optIds)) { foreach ($element->_options as $option) { - if ($option['attr']['value'] === "crm_disabled_opt-{$element->getValue()[0]}") { + if ($option['attr']['value'] === "crm_disabled_opt-{$value[0]}") { $placeholder = html_entity_decode($option['text']); $element->updateAttributes(array('placeholder' => $placeholder)); break; diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index d356cfebbb..3e5dc64e7a 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -1136,9 +1136,8 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $params['payment_action'] = 'Sale'; $params['invoiceID'] = $invoiceID; } - - if (!empty($this->get('params')) && is_array($this->get('params'))) { - $this->_params = $this->get('params'); + $this->_params = $this->get('params'); + if (!empty($this->_params) && is_array($this->_params)) { $this->_params[0] = $params; } else { -- 2.25.1