From c54ef51b836993d12b5be272a2c533767f0ad56d Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Sun, 5 Dec 2010 03:32:14 -0500
Subject: [PATCH] bug #983452 by marvil07 | foredoc: Fixed 0 votes displayed on comment, even if comment voting is disabled.

---
 vud_comment/vud_comment.module |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git vud_comment/vud_comment.module vud_comment/vud_comment.module
index de60033..9bd093f 100644
--- vud_comment/vud_comment.module
+++ vud_comment/vud_comment.module
@@ -150,13 +150,15 @@ function vud_comment_link($type, $object, $teaser = FALSE) {
       $votes_display_mode = variable_get('vud_comment_votes', 1);
       $widget_theme = variable_get('vud_comment_widget', 'plain');
       $tag = variable_get('vud_tag', 'vote');
-      if ($votes_display_mode) {
+      $node = node_load($comment->nid);
+      $votable_node_type_comment = in_array($node->type, variable_get('vud_comment_node_types', array()), TRUE);
+      if ($votable_node_type_comment && $votes_display_mode) {
         $links['vud_comment_votes_count'] = array(
           'title' => theme('vud_votes', $comment->cid, $type, $tag, $widget_theme),
           'html' => TRUE,
         );
       }
-      if (variable_get('vud_comment_reset', 0) && user_access('reset vote up/down votes')) {
+      if ($votable_node_type_comment && variable_get('vud_comment_reset', 0) && user_access('reset vote up/down votes')) {
         $criteria = array(
           'content_type' => $type,
           'content_id' => $comment->cid,
-- 
1.7.2.3

