From 7a03043f33b3d3e1ee683f83d257b1225fb9ab0e Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 20 Jun 2016 15:39:12 +0530 Subject: [PATCH] CRM-18656 - minor optimisation --- CRM/Contact/Form/Search/Advanced.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php index 768d52fa76..9eff8f8b99 100644 --- a/CRM/Contact/Form/Search/Advanced.php +++ b/CRM/Contact/Form/Search/Advanced.php @@ -393,12 +393,8 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { * id of the tagset. */ if (isset($defaults['contact_tags'])) { - $tag = new CRM_Core_BAO_Tag(); foreach ($defaults['contact_tags'] as $key => $tagId) { - $params = array('id' => $tagId); - $result = array(); - $tag->retrieve($params, $result); - $parentId = $result['parent_id']; + $parentId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $tagId, 'parent_id'); $element = "contact_taglist[$parentId]"; if ($this->elementExists($element)) { // This tag is a tagset -- 2.25.1