*** Z:\_Distr\_drupal\_upd\custom_breadcrumbs\custom_breadcrumbs.module 2010-01-20 03:06:22.000000000 +-0300
--- Z:\home\druptest.ru\www\sites\all\modules\custom_breadcrumbs\custom_breadcrumbs.module 2010-01-26 23:02:00.000000000 +-0300
***************
*** 713,724 ****
--- 713,726 ----
      $link['options']['attributes']['id'] = $link['localized_options']['attributes']['id'];
  
      // Each link in series is another level of recursion. Add it to the stack.
      _custom_breadcrumbs_menu_stack($link);
      if (custom_breadcrumbs_in_active_trail($link)) {
        $link['localized_options']['attributes']['class'] = 'active';
+       $link['options']['attributes']['class'] = $link['localized_options']['attributes']['class'];
+       $link['in_active_trail'] = 1;
      }
    }
    // Pass the altered variables to the normal menu themer.
    return $function($link);
  }
  
***************
*** 743,773 ****
--- 745,778 ----
      // Load the tree below the current position.
      $tree = _custom_breadcrumbs_menu_subtree($item);
      $force_active_trail = FALSE;
      if (!empty($tree)) {
        foreach ($tree as $sub => $data) {
          if (custom_breadcrumbs_in_active_trail($data['link'])) {
+           $tree[$sub]['link']['in_active_trail'] = 1;
            $force_active_trail = TRUE;
          }
          else {
            $belows = (array)$data['below'];
            foreach ($belows as $id => $below) {
              // Descend...
              if (custom_breadcrumbs_in_active_trail($below['link'])) {
+               $tree[$sub]['below'][$id]['link']['in_active_trail'] = 1;
                $force_active_trail = TRUE;
              }
              else {
                unset($tree[$sub]['below'][$id]);
              }
            }
          }
        }
      }
      if ($force_active_trail) {
        // Render it...
        $menu = menu_tree_output($tree);
+       $extra_class .= ' active-trail';
        $in_active_trail = TRUE;
      }
  
      // Sanitize tree. If we found no children, the item has none.
      if (!$menu) {
        $has_children = FALSE;



*** Z:\_Distr\_drupal\_upd\custom_breadcrumbs\custom_breadcrumbs_taxonomy\custom_breadcrumbs_taxonomy.inc 2010-01-26 22:57:39.000000000 +-0300
--- Z:\home\druptest.ru\www\sites\all\modules\custom_breadcrumbs\custom_breadcrumbs_taxonomy\custom_breadcrumbs_taxonomy.inc 2010-01-26 23:00:00.000000000 +-0300
***************
*** 63,74 ****
--- 63,103 ----
        _custom_breadcrumbs_taxonomy_recent_term($tid);
      }
      if (variable_get('custom_breadcrumbs_taxonomy_include_node_title', FALSE) && isset($objs['node'])) {
        $breadcrumb[] = $objs['node']->title;
      }
      drupal_set_breadcrumb($breadcrumb);
+     $trail = null;
+     $pattern = '/<a href="([^"]+)">(.+)<\/a>/';
+     foreach($breadcrumb as $crumb) {
+       if (preg_match($pattern, $crumb, $matches)) {
+         $href = $matches[1];
+         $title = $matches[2];
+         if ($href == '/') {
+           $href = '<front>';
+         }
+         elseif ($href[0] == '/') {
+           $href = substr($href, 1);
+         }
+       }
+       else {
+         $title = $crumb;
+         $href = null;
+       }
+       if (empty($trail)) {
+         $trail = array('title' => $title, 'href' => $href, 'localized_options' => array());
+       }
+       else {
+         $trail[] = array('title' => $title, 'href' => $href);
+       }
+     }
+     //if (!variable_get('custom_breadcrumbs_taxonomy_include_node_title', FALSE) && isset($objs['node'])) {
+     //  $trail[] = array('title' => $objs['node']->title, 'href' => 'node/'.$objs['node']->nid);
+     //}
+     menu_set_active_trail($trail);
    }
    else {
      global $language;
      $languages = array('language' => $language->language, 'all' => '');
      // Check each term to see if it has a custom breadcrumb.
      $vids = array();
