Skip to content
Snippets Groups Projects
Commit d57546d9 authored by Tim Otten's avatar Tim Otten
Browse files

Merge pull request #416 from dlobo/CRM-8963

CRM-8963
parents 61e03291 5c280496
Branches
Tags
No related merge requests found
......@@ -665,8 +665,14 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC,
static function fixAllStateSelects(&$form, $defaults, $batchFieldNames = false) {
$config = CRM_Core_Config::singleton();
$map = is_array($batchFieldNames) ? $batchFieldNames : $config->stateCountryMap;
$map = null;
if (is_array($batchFieldNames)) {
$map = $batchFieldNames;
}
else if (!empty($config->stateCountryMap)) {
$map = $config->stateCountryMap;
}
if (!empty($map)) {
foreach ($map as $index => $match) {
......
......@@ -351,7 +351,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
$formattedValues[$count][$prefix1 . 'CustomPostGroupTitle'] = $groupName;
}
$count++;
}
}
$this->_fields = $profileFields;
}
if (!empty($formattedValues) ) {
......@@ -462,7 +462,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
$contactID = $this->_params[0]['contact_id'];
}
else {
$contactID = parent::getContactID();
$contactID = $this->getContactID();
}
// if a discount has been applied, lets now deduct it from the amount
......@@ -563,7 +563,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
// we dont store in userID in case the user is doing multiple
// transactions etc
// for things like tell a friend
if (!parent::getContactID() && CRM_Utils_Array::value('is_primary', $value)) {
if (!$this->getContactID() && CRM_Utils_Array::value('is_primary', $value)) {
$session->set('transaction.userID', $contactID);
}
......
......@@ -141,7 +141,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
return;
}
$contactID = parent::getContactID();
$contactID = $this->getContactID();
if ($contactID) {
//@todo CRM-11915 I observed that even when the billing block is not present the routine to retrieve the billing defaults is still called - which seems a bit redundant.
$names = array(
......@@ -342,7 +342,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
}
}
$contactID = parent::getContactID();
$contactID = $this->getContactID();
$this->assign('contact_id', $contactID);
$this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID));
......@@ -449,7 +449,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
$this->assign('bypassPayment', $bypassPayment);
$this->assign('showHidePaymentInformation', $showHidePaymentInformation);
$userID = parent::getContactID();
$userID = $this->getContactID();
if (!$userID) {
$createCMSUser = FALSE;
......@@ -1225,7 +1225,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
$contactID = $value['contact_id'];
}
else {
$contactID = parent::getContactID();
$contactID = $this->getContactID();
}
CRM_Event_Form_Registration_Confirm::fixLocationFields($value, $fields);
......@@ -1240,7 +1240,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
// we dont store in userID in case the user is doing multiple
// transactions etc
// for things like tell a friend
if (!parent::getContactID() && CRM_Utils_Array::value('is_primary', $value)) {
if (!$this->getContactID() && CRM_Utils_Array::value('is_primary', $value)) {
$session->set('transaction.userID', $contactID);
}
......@@ -1372,7 +1372,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
$contactID = NULL;
$session = CRM_Core_Session::singleton();
if (!$isAdditional) {
$contactID = parent::getContactID();
$contactID = $self->getContactID();
}
if (!$contactID && is_array($fields) && $fields) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment