Index: community_tags.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/community_tags/community_tags.module,v retrieving revision 1.37.2.8 diff -u -p -r1.37.2.8 community_tags.module --- community_tags.module 29 Aug 2009 17:32:45 -0000 1.37.2.8 +++ community_tags.module 23 Oct 2009 02:18:52 -0000 @@ -184,8 +185,10 @@ function community_tags_perm() { function community_tags_nodeapi(&$node, $op, $teaser) { switch ($op) { case 'load': - $node->tags = tagadelic_node_get_terms($node); - $node->community_tags_form = variable_get('community_tags_display_'. $node->type, COMMUNITY_TAGS_MODE_TAB) == COMMUNITY_TAGS_MODE_INLINE; + if (db_result(db_query("SELECT vid FROM {vocabulary_node_types} WHERE vid IN (%s) AND type = '%s'", join(',', variable_get('community_tags_vocabularies', array())), $node->type))) { + $node->tags = tagadelic_node_get_terms($node); + $node->community_tags_form = variable_get('community_tags_display_'. $node->type, COMMUNITY_TAGS_MODE_DEFAULT) == COMMUNITY_TAGS_MODE_INLINE; + } break; case 'insert': @@ -194,10 +197,13 @@ function community_tags_nodeapi(&$node, // the community_tags table so we can keep track of the count. // When adding a tag from the add/edit node page, the count will always // be one. Only when using a "quick add" form can we increase the count. - if (is_array($node->taxonomy['tags'])) { - global $user; - community_tags_taxonomy_node_save($node, $node->taxonomy, TRUE, $user->uid); - } + + // @todo Fix the behavior on the edit form so that it is either meaningful or omitted. + // Greg: This behavior is not intuitive, so I have disabled it. +// if (is_array($node->taxonomy['tags'])) { +// global $user; +// community_tags_taxonomy_node_save($node, $node->taxonomy, TRUE, $user->uid); +// } break; case 'view':