From: kurund Date: Mon, 5 Aug 2013 22:35:00 +0000 (+0530) Subject: CRM-13107, fixed for event confirm/thank you screen to show prefix/suffix/gender... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=36c514a185e2681c356593790fa39d6b72bcdc41;p=civicrm-core.git 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 --- 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'))) {