From: jitendrapurohit Date: Mon, 20 Jun 2016 10:09:12 +0000 (+0530) Subject: CRM-18656 - minor optimisation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7a03043f33b3d3e1ee683f83d257b1225fb9ab0e;p=civicrm-core.git CRM-18656 - minor optimisation --- 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