/[drupal]/contributions/modules/taxonomy_menu/taxonomy_menu.database.inc
ViewVC logotype

Diff of /contributions/modules/taxonomy_menu/taxonomy_menu.database.inc

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

revision 1.1.2.15, Sat Oct 31 18:39:33 2009 UTC revision 1.1.2.16, Sat Oct 31 20:15:22 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  // $Id: taxonomy_menu.database.inc,v 1.1.2.14 2009/08/30 01:56:31 indytechcook Exp $  // $Id: taxonomy_menu.database.inc,v 1.1.2.15 2009/10/31 18:39:33 indytechcook Exp $
4    
5  /**  /**
6   * @file   * @file
# Line 131  function _taxonomy_menu_term_count($tid) Line 131  function _taxonomy_menu_term_count($tid)
131    return db_result(db_query(db_rewrite_sql('SELECT COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND t.tid = %d'), $tid));    return db_result(db_query(db_rewrite_sql('SELECT COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND t.tid = %d'), $tid));
132  }  }
133    
 function _taxonomy_menu_term_count($tid) {  
   $view = views_get_view('taxonomy_term');  
   if(is_object($view)){  
 $args = array($tid);  
 $view->set_arguments($args);  
 $view->execute_display('page', $args);  
 return $view->total_rows;  
   } else {  
 return db_result(db_query('SELECT COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND t.tid = %d', $tid));  
   }  
 }  
   
134  /**  /**
135   * Get tid for a given mlid   * Get tid for a given mlid
136   *   *

Legend:
Removed from v.1.1.2.15  
changed lines
  Added in v.1.1.2.16

  ViewVC Help
Powered by ViewVC 1.1.2