/[drupal]/contributions/modules/taxonomy_block/taxonomy_block.module
ViewVC logotype

Diff of /contributions/modules/taxonomy_block/taxonomy_block.module

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

revision 1.23, Wed Jun 24 11:49:39 2009 UTC revision 1.24, Fri Jun 26 09:02:02 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_block.module,v 1.22 2009/06/24 10:36:56 thenicespider Exp $  // $Id: taxonomy_block.module,v 1.23 2009/06/24 11:49:39 thenicespider Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 84  function taxonomy_block_block($op = 'lis Line 84  function taxonomy_block_block($op = 'lis
84          $name_parent= $term_parent->name;          $name_parent= $term_parent->name;
85    
86          $output .= '<li>';          $output .= '<li>';
87          $output .= l(tt("taxonomy:term:$tid_parent:name", $name_parent), "taxonomy/term/$tid_parent");          if (module_exists("i18n")) {
88              $output .= l(tt("taxonomy:term:$tid_parent:name", $name_parent), "taxonomy/term/$tid_parent");
89            } else {
90              $output .= l(t($name_parent), "taxonomy/term/$tid_parent");
91            }
92          if ($node_count) {          if ($node_count) {
93            $total_parent = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $tid_parent));            $total_parent = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $tid_parent));
94            $output .= " ($total_parent)";            $output .= " ($total_parent)";
# Line 108  function taxonomy_block_block($op = 'lis Line 112  function taxonomy_block_block($op = 'lis
112              $name_child = $term_child->name;              $name_child = $term_child->name;
113    
114              $output .= '<li>';              $output .= '<li>';
115              $output .= l(tt("taxonomy:term:$tid_child:name", $name_child), "taxonomy/term/$tid_child");              if (module_exists("i18n")) {
116                  $output .= l(tt("taxonomy:term:$tid_child:name", $name_child), "taxonomy/term/$tid_child");
117                } else {
118                  $output .= l(t($name_child), "taxonomy/term/$tid_child");
119                }
120              if ($node_count) {              if ($node_count) {
121                $total_child = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $tid_child));                $total_child = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $tid_child));
122                $output .= " ($total_child)";                $output .= " ($total_child)";

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.2