From: Tim Mallezie Date: Tue, 17 Feb 2015 13:42:02 +0000 (+0100) Subject: add relationshiptype filter to ajax getcontactrelationships call X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=827fbf73afab5725e17a86863c5c27c9f5737b64;p=civicrm-core.git add relationshiptype filter to ajax getcontactrelationships call --- diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 0ac35bd7a0..55bcf0874b 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -1038,6 +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'); if (!CRM_Contact_BAO_Contact_Permission::allow($contactID)) { return CRM_Utils_System::permissionDenied(); @@ -1073,6 +1074,7 @@ LIMIT {$offset}, {$rowCount} $params['contact_id'] = $contactID; $params['context'] = $context; + $params['relationship_type_id'] = $relationship_type_id; // get the contact relationships $relationships = CRM_Contact_BAO_Relationship::getContactRelationshipSelector($params);