CRM-16990: Custom fields are NOT being saved for some component custom data (activiti...
authoryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 23 Oct 2015 11:24:49 +0000 (16:54 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 23 Oct 2015 11:24:49 +0000 (16:54 +0530)
----------------------------------------
* CRM-16990: Custom fields are NOT being saved for some component custom data (activities, membership ...)
  https://issues.civicrm.org/jira/browse/CRM-16990

CRM/Contact/Form/Relationship.php

index 83214662886b548edad28a3a8e4b251b994f82de..4c92293f59426170dc878d3da054ca229829f290 100644 (file)
@@ -168,7 +168,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
     }
 
     if (!$this->_rtypeId) {
-      $params = $this->controller->exportValues($this->_name);
+      $params = CRM_Utils_Request::exportValues();
       if (isset($params['relationship_type_id'])) {
         $this->_rtypeId = $params['relationship_type_id'];
       }
@@ -200,11 +200,6 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
       }
     }
 
-    // retrieve relation type id from post variables
-    if (!$this->_relationshipTypeId) {
-      $rType = explode('_', CRM_Utils_Array::value('relationship_type_id', $_POST));
-      $this->_relationshipTypeId = $rType[0];
-    }
     // when custom data is included in this page
     if (!empty($_POST['hidden_custom'])) {
       CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_relationshipTypeId, 1, 'Relationship', $this->_relationshipId);