From 70b9c8997ebfc28758165c1466b045b8261a14d2 Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Wed, 13 Oct 2010 18:30:40 -0500
Subject: [PATCH] Anonymous voting does not work with core normal cache

---
 vud.module    |    2 +-
 vud.theme.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git vud.module vud.module
index 4b11568..6a3c844 100644
--- vud.module
+++ vud.module
@@ -157,7 +157,7 @@ function vud_user_votes() {
  * Callback to reset votes on an object.
  */
 function vud_reset($type, $content_id, $tag, $token) {
-  if (drupal_valid_token($token, "votereset/$type/$content_id/$tag")) {
+  if (drupal_valid_token($token, "votereset/$type/$content_id/$tag", TRUE)) {
     $uid = votingapi_current_user_identifier();
     $criteria = array(
       'content_type' => $type,
diff --git vud.theme.inc vud.theme.inc
index 684fc0b..28e7e58 100644
--- vud.theme.inc
+++ vud.theme.inc
@@ -352,7 +352,7 @@ function vud_add_files($type, $plugin) {
  * Function for the main voting handler with Ajax support.
  */
 function vud_vote($type, $content_id, $value, $tag, $widget, $token) {
-  if (is_numeric($value) && drupal_valid_token($token, "vote/$type/$content_id/$value/$tag/$widget")) {
+  if (is_numeric($value) && drupal_valid_token($token, "vote/$type/$content_id/$value/$tag/$widget", TRUE)) {
     $vote = array();
     // Sanity-check the incoming values.
     if ($value > 0) {
-- 
1.7.1

