Skip to content

Commit

Permalink
revert changes to include child tag count in parent tag
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Jun 15, 2017
1 parent dfe61fc commit 254bd1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions CRM/Admin/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,6 @@ public static function getTagTree() {
$style = "background-color: {$dao->color}; color: " . CRM_Utils_Color::getContrast($dao->color);
}
$hasChildTags = empty($childTagIDs[$dao->id]) ? FALSE : TRUE;
// get tag IDs includeing its child tags, later used to fetch usage count
$tagIDs = array($dao->id);
if ($hasChildTags) {
$tagIDs = array_merge($tagIDs, $childTagIDs[$dao->id]);
}
$usedFor = (array) explode(',', $dao->used_for);
$result[] = array(
'id' => $dao->id,
Expand All @@ -348,7 +343,7 @@ public static function getTagTree() {
'color' => $dao->color ? $dao->color : '#ffffff',
'usages' => civicrm_api3('EntityTag', 'getcount', array(
'entity_table' => array('IN' => $usedFor),
'tag_id' => array('IN' => $tagIDs),
'tag_id' => $dao->id,
)),
),
);
Expand Down

0 comments on commit 254bd1f

Please sign in to comment.