From 36c514a185e2681c356593790fa39d6b72bcdc41 Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 6 Aug 2013 04:05:00 +0530 Subject: [PATCH] CRM-13107, fixed for event confirm/thank you screen to show prefix/suffix/gender labels ---------------------------------------- * CRM-13107: Individual Prefix, Suffix and Gender fields are broken in Profile Create, Edit and View http://issues.civicrm.org/jira/browse/CRM-13107 --- CRM/Event/BAO/Event.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index c2d58884f8..97d35cbdc4 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1392,17 +1392,8 @@ WHERE civicrm_event.is_active = 1 $values[$index] = ''; } } - elseif ('gender' == substr($name, 0, 6)) { - $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'); - $values[$index] = $gender[$params[$name]]; - } - elseif ('individual_prefix' == substr($name, 0, 17)) { - $prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id'); - $values[$index] = $prefix[$params[$name]]; - } - elseif ('individual_suffix' == substr($name, 0, 17)) { - $suffix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'suffix_id'); - $values[$index] = $suffix[$params[$name]]; + elseif (in_array(substr($name, 0, -3), array('gender', 'prefix', 'suffix'))) { + $values[$index] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', $name, $params[$name]); } elseif (in_array($name, array( 'addressee', 'email_greeting', 'postal_greeting'))) { -- 2.25.1