From 782bfb8a1ac111bebc25041c7255db350c2e043a Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Thu, 2 Apr 2015 15:28:09 +0530 Subject: [PATCH] CRM-16055WebtestFix --- CRM/Contact/Form/Relationship.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index ef319986e7..09be618284 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -404,6 +404,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { // Update mode (always single) if ($this->_action & CRM_Core_Action::UPDATE) { + $update = TRUE; $params['id'] = $this->_relationshipId; $ids['relationship'] = $this->_relationshipId; $relation = CRM_Contact_BAO_Relationship::getRelationshipByID($this->_relationshipId); @@ -437,6 +438,9 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { // Save the relationships. $outcome = CRM_Contact_BAO_Relationship::createMultiple($params, $relationshipTypeParts[1]); $relationshipIds = $outcome['relationship_ids']; + if (empty($outcome['saved']) && !empty($update)) { + $outcome['saved'] = $update; + } $this->setMessage($outcome); // if this is called from case view, @@ -526,7 +530,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { * - 'saved' : boolean of whether save was successful */ protected function setMessage($outcome) { - if (!empty($outcome['valid'])) { + if (!empty($outcome['valid']) && empty($outcome['saved'])) { CRM_Core_Session::setStatus(ts('Relationship created.', array( 'count' => $outcome['valid'], 'plural' => '%count relationships created.', -- 2.25.1