From cdee9432f59e76c1bdc00471c7090fdaf9a26919 Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Tue, 17 Feb 2015 15:24:57 +0100 Subject: [PATCH] make relationshiptype selector optional --- CRM/Contact/Page/AJAX.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 55bcf0874b..e9d2279eb4 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -1038,7 +1038,7 @@ LIMIT {$offset}, {$rowCount} public static function getContactRelationships() { $contactID = CRM_Utils_Type::escape($_GET['cid'], 'Integer'); $context = CRM_Utils_Type::escape($_GET['context'], 'String'); - $relationship_type_id = CRM_Utils_Type::escape($_GET['relationship_type_id'], 'Integer'); + $relationship_type_id = CRM_Utils_Type::escape($_GET['relationship_type_id'], 'Integer', FALSE); if (!CRM_Contact_BAO_Contact_Permission::allow($contactID)) { return CRM_Utils_System::permissionDenied(); @@ -1074,7 +1074,9 @@ LIMIT {$offset}, {$rowCount} $params['contact_id'] = $contactID; $params['context'] = $context; - $params['relationship_type_id'] = $relationship_type_id; + if($relationship_type_id){ + $params['relationship_type_id'] = $relationship_type_id; + } // get the contact relationships $relationships = CRM_Contact_BAO_Relationship::getContactRelationshipSelector($params); -- 2.25.1