updown_comment doesn't obey votedown/unvote settings

lyricnz - January 9, 2009 - 12:57
Project:UpDown
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

This is (for example) because the node-type form sets the variable "updown_comment_votedown_$type" but the code that creates the output is looking for updown_unvote_comment_$type (ie: wrong order).

<?php
// create the output
   
$widget = (user_access('rate content with updown')) ? theme('updown_active_widget', 'comment', $comment->cid, variable_get('updown_unvote_comment_'. $node->type, FALSE), variable_get('updown_votedown_comment_'. $node->type, TRUE)) : theme('updown_inactive_widget', 'comment', $comment->cid);

// settings page
   
$form['updown_comment']['updown_comment_votedown'] = array(
     
'#type' => 'checkbox',
     
'#title' => t('Allow users to vote content down'),
     
'#default_value' => variable_get('updown_comment_votedown_'. $form['#node_type']->type, 1),
     
'#return_value' => 1,
    );
?>

 
 

Drupal is a registered trademark of Dries Buytaert.