/[drupal]/contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.inc
ViewVC logotype

Diff of /contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2, Fri Apr 24 02:51:41 2009 UTC revision 1.1.2.3, Sun May 31 19:37:18 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: $  // $Id: taxonomy_breadcrumb.inc,v 1.1.2.2 2009/04/24 02:51:41 mgn Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 51  function _taxonomy_breadcrumb_term_page( Line 51  function _taxonomy_breadcrumb_term_page(
51   */   */
52  function _taxonomy_breadcrumb_node_get_lightest_term($nid) {  function _taxonomy_breadcrumb_node_get_lightest_term($nid) {
53    
54  /* We only want the first row of the result--this is the lightest term of the    // We only want the first row of the result. This is the lightest term of the
55   * lightest vocab.  This query should be the same as the query found in    // lightest vocab.
56   * taxonomy_node_get_terms.    $result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {term_hierarchy} h ON t.tid = h.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, h.parent DESC, t.weight, t.name', 't', 'tid'), $nid);
57   */  
   $result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $nid);  
58    // Extract the first row of query.    // Extract the first row of query.
59    $term = db_fetch_object($result);    $term = db_fetch_object($result);
60    
61    return $term;    return $term;
62  }  }
63    

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.2