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

Diff of /contributions/modules/tagadelic/tagadelic.module

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

revision 1.40.2.9, Mon Sep 14 20:23:34 2009 UTC revision 1.40.2.10, Mon Sep 14 20:26:06 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: tagadelic.module,v 1.40.2.8 2009/09/14 20:21:45 ber Exp $  // $Id: tagadelic.module,v 1.40.2.9 2009/09/14 20:23:34 ber Exp $
3    
4  /**  /**
5   * Implementation of hook_help   * Implementation of hook_help
# Line 169  function tagadelic_page_list($vocs) { Line 169  function tagadelic_page_list($vocs) {
169   * @param $node. A node object.   * @param $node. A node object.
170   */   */
171  function tagadelic_node_get_terms($node) {  function tagadelic_node_get_terms($node) {
172      static $vocs;
173    if ($terms = taxonomy_node_get_terms($node, 'tid')) {    if ($terms = taxonomy_node_get_terms($node, 'tid')) {
174        if (!isset($vocs[$node->type])) {
175          $vocs[$node->type] = taxonomy_get_vocabularies($node->type);
176        }
177      $tags = array();      $tags = array();
     $vocs = taxonomy_get_vocabularies($node->type);  
178      foreach ($terms as $tid => $term) {      foreach ($terms as $tid => $term) {
179        if ($vocs[$term->vid]->tags) {        if ($vocs[$node->type][$term->vid]->tags) {
180          $tags[$term->vid][$tid] = $term;          $tags[$term->vid][$tid] = $term;
181        }        }
182      }      }

Legend:
Removed from v.1.40.2.9  
changed lines
  Added in v.1.40.2.10

  ViewVC Help
Powered by ViewVC 1.1.2