Loading vud.theme.inc +9 −8 Changes for vud.theme.inc: 9 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -352,15 +352,12 @@ function vud_vote($type, $content_id, $value, $tag, $widget, $token) { $value = -1; } else { $value = FALSE; } // Do not allow vote with the same value if ( ($casted_vote > 0 && $value > 0) || ($casted_vote < 0 && $value < 0) ) { $value = FALSE; // Invalid value. watchdog('vud', 'Invalid vote on @type @content_id, with value @value, tag @tag and token @token', array('@type' => $type, '@content_id' => $content_id, '@value' => $value, '@tag' => $tag, '@token' => $token)); return; } if ($value !== FALSE) { $vote['value'] = $value; $vote['value_type'] = 'points'; $tag = $tag ? $tag : variable_get('vud_tag', 'vote'); Loading @@ -369,8 +366,12 @@ function vud_vote($type, $content_id, $value, $tag, $widget, $token) { $vote['content_type'] = $type; $votes = array(0 => $vote); drupal_alter('vud_votes', $votes); votingapi_set_votes($votes); // Do not allow to vote with the same value. if ($casted_vote == $votes[0]['value']) { return; } votingapi_set_votes($votes); } else { watchdog('vud', Loading Loading
vud.theme.inc +9 −8 Changes for vud.theme.inc: 9 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -352,15 +352,12 @@ function vud_vote($type, $content_id, $value, $tag, $widget, $token) { $value = -1; } else { $value = FALSE; } // Do not allow vote with the same value if ( ($casted_vote > 0 && $value > 0) || ($casted_vote < 0 && $value < 0) ) { $value = FALSE; // Invalid value. watchdog('vud', 'Invalid vote on @type @content_id, with value @value, tag @tag and token @token', array('@type' => $type, '@content_id' => $content_id, '@value' => $value, '@tag' => $tag, '@token' => $token)); return; } if ($value !== FALSE) { $vote['value'] = $value; $vote['value_type'] = 'points'; $tag = $tag ? $tag : variable_get('vud_tag', 'vote'); Loading @@ -369,8 +366,12 @@ function vud_vote($type, $content_id, $value, $tag, $widget, $token) { $vote['content_type'] = $type; $votes = array(0 => $vote); drupal_alter('vud_votes', $votes); votingapi_set_votes($votes); // Do not allow to vote with the same value. if ($casted_vote == $votes[0]['value']) { return; } votingapi_set_votes($votes); } else { watchdog('vud', Loading