Index: og_subgroups.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_subgroups/og_subgroups.module,v
retrieving revision 1.14
diff -r1.14 og_subgroups.module
208a209
> 
236a238
>   
489,491c491
<   if ($family_type == 'none') {
<     return FALSE;
<   }
---
>   
497a498
>     
502a504,505
>     
>       if (!empty($this_tree[$family_type])) {
504,510c507,515
<         $my_member = node_load($this_key);
<         if (!og_is_omitted_type($my_member->type)) {
<           $gid = $this_key;
<           $sql = "INSERT INTO {og_ancestry} (nid, group_nid, is_public) VALUES (%d, %d, %d)";
<           db_query($sql, $this_node->nid, $gid, $this_node->og_public);
<         }
<       }
---
>          $my_member = node_load($this_key);
>          if (!og_is_omitted_type($my_member->type)) {
>            $gid = $this_key;
>            $sql = "INSERT INTO {og_ancestry} (nid, group_nid, is_public) VALUES (%d, %d, %d)";
>            db_query($sql, $this_node->nid, $gid, $this_node->og_public);
>          }
>        }
>      }
>        
515a521,522
> 
>   drupal_set_message("og subgroups get family called");
517a525
> 
523a532
> 
525a535,536
>       
>       //Build the first level of the tree
527,530c538,543
<       $tree[$value]['title'] = $node->og_groups_names[$key];
<       $tree[$value][$relationship_type] = $func($value);
<       foreach ($tree[$value][$relationship_type] as $this_member) {
<         unset($tree[$this_member['nid']]);
---
>       unset($tree[$value]['title']);
>       $tree[$value]['title'] = $node->og_groups_names[$key]; //when the node is not already in node og_groups this results in a blank title
>       
>       //build parents or children (or nothing)
>       if ($relationship_type != 'none') {
>         $tree[$value][$relationship_type] = $func($value); //og_subgroups_get_parents or og_subgroups_get_children
531a545,554
>      
>       if (!empty($tree[$value][$relationship_type])) {
>         foreach ($tree[$value][$relationship_type] as $this_member) {
>           //unset the parents from the first level of the tree
>           if ($this_member['nid'] != $tree[$value]['nid']) { //Don't unset the parent from the first level -- BUT DO UNSET IT FROM ITS OWN PARENT
>            unset($tree[$this_member['nid']]); 
>           }
>         }  
>       }
>       
689c712
< 	}
---
> 	  }
691d713
< 
