Arrow_left   Arrow_right
 
  #76

Double Vote by Refreshing

  • Followers
     
    Ico-users carlo75 (Assigned To) , nick_ramsay 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Jan 15, 2010 @ 06:54PM UTC * By nick_ramsay

    Assigned to changed from nick_ramsay to carlo75
    I can't duplicate this. I've tried in Firefox 3.5.7, IE8, Chrome, Opera and Safari.

    I notice there is already a double-vote check in vote/vote_functions.php, but it doesn't get used because a double vote simply "unvotes" the first vote.


            // get vote history for this post:
            
            $sql = "SELECT vote_rating FROM " . TABLE_POSTVOTES . " WHERE vote_post_id = %d AND vote_user_id = %d AND vote_rating != %d";
            $voted = $h->db->get_var($h->db->prepare($sql, $post_id, $user_id, -999));
            
            if ($voted == $vote_rating) {
                // Repeat vote. Must be from a double-click. Return false and 
                $json_array = array('result'=>$h->lang['vote_already_voted']);
                echo json_encode($json_array);
                return false;
            }


    I'll pass this ticket to Carlo :)
    User picture

          on Jan 28, 2010 @ 09:38PM UTC * By nick_ramsay

    Status changed from New to Test
    No feedback, so I'm moving this ticket to "Test".
    User picture

          on Apr 27, 2010 @ 06:10AM UTC * By carlo75

    Status changed from Test to Fixed
    Time Expenditure
    Loading