
--- jrating.module	Fri May 11 09:40:52 2007
+++ jrating.module	Tue Jun 26 16:28:57 2007
@@ -256,7 +256,7 @@ function jrating_set_vote($nid, $vote, $
   else { // anonymous
     $hostname = $_SERVER['HTTP_X_FORWARDED_FOR'] ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
     
-    if ($old_vote = db_result(db_query("SELECT vote_id FROM {votingapi_vote} WHERE content_type = 'node' AND content_id = %d AND value_type = '%s' AND tag = 'vote' AND uid = %d AND hostname = '%s' AND timestamp > %d", $nid, $vote->value_type, $uid, $hostname, time() - (60 * 60 * 24)))){ // existing votes from the same IP address within the past day
+    if ($old_vote = db_fetch_object(db_query("SELECT vote_id FROM {votingapi_vote} WHERE content_type = 'node' AND content_id = %d AND value_type = '%s' AND tag = 'vote' AND uid = %d AND hostname = '%s' AND timestamp > %d", $nid, $vote->value_type, $uid, $hostname, time() - (60 * 60 * 24)))){ // existing votes from the same IP address within the past day
       $vote->value ? votingapi_change_vote($old_vote, $vote->value) : votingapi_delete_vote($old_vote);
     }
     else {