CRM-13107, more clean / removed extra code
authorkurund <kurund@civicrm.org>
Mon, 5 Aug 2013 21:37:44 +0000 (03:07 +0530)
committerkurund <kurund@civicrm.org>
Mon, 5 Aug 2013 21:37:44 +0000 (03:07 +0530)
----------------------------------------
* 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/Core/BAO/UFGroup.php

index d3705683f085749b9307e82a9b98f20b27eae014..f3e05f043317693d82b7418561c156539b6d6951 100644 (file)
@@ -2218,17 +2218,8 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
 
         if (CRM_Utils_Array::value($name, $details) || isset($details[$name])) {
           //to handle custom data (checkbox) to be written
-          // to handle gender / suffix / prefix / greeting_type
-          if ($name == 'gender') {
-            $defaults[$fldName] = $details['gender_id'];
-          }
-          elseif ($name == 'individual_prefix') {
-            $defaults[$fldName] = $details['individual_prefix_id'];
-          }
-          elseif ($name == 'individual_suffix') {
-            $defaults[$fldName] = $details['individual_suffix_id'];
-          }
-          elseif (($name == 'birth_date') || ($name == 'deceased_date')) {
+          // to handle birth/deceased date, greeting_type and few other fields
+          if (($name == 'birth_date') || ($name == 'deceased_date')) {
             list($defaults[$fldName]) = CRM_Utils_Date::setDateDefaults($details[$name], 'birth');
           }
           elseif (in_array($name, CRM_Contact_BAO_Contact::$_greetingTypes)) {