From 674b20c923929a8330c15184b5a0e578f95e5cd0 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 14 Dec 2015 02:15:29 +0000 Subject: [PATCH] CRM-17654 Fix issue where it wasn't storing all selected relationship types in db --- CRM/Report/Form/Contact/Relationship.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Report/Form/Contact/Relationship.php b/CRM/Report/Form/Contact/Relationship.php index 7ffaace1c2..fc506efdeb 100644 --- a/CRM/Report/Form/Contact/Relationship.php +++ b/CRM/Report/Form/Contact/Relationship.php @@ -558,10 +558,11 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { $this->beginPostProcess(); $this->relationType = NULL; - $relType = array(); + $originalRelationshipTypeIdValue = $this->_params['relationship_type_id_value']; if (!empty($this->_params['relationship_type_id_value'])) { $relationshipTypes = array(); $direction = array(); + $relType = array(); foreach ($this->_params['relationship_type_id_value'] as $relationship_type) { $relType = explode('_', $relationship_type); $direction[] = $relType[1] . '_' . $relType[2]; @@ -583,9 +584,9 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { $this->formatDisplay($rows); $this->doTemplateAssignment($rows); - if (!empty($relType)) { + if (!empty($originalRelationshipTypeIdValue)) { // store its old value, CRM-5837 - $this->_params['relationship_type_id_value'] = implode('_', $relType); + $this->_params['relationship_type_id_value'] = $originalRelationshipTypeIdValue; } $this->endPostProcess($rows); } -- 2.25.1