Closed (fixed)
Project:
Voting API
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2009 at 01:09 UTC
Updated:
23 Oct 2010 at 02:30 UTC
Jump to comment: Most recent file
I could not get the anonymous window to work properly with the Plus 1 module. Looking into the code a little deeper I noticed that the Plus1 Module calls "votingapi_select_votes" to determine if the current 'user' has casted any votes. In "votingapi_select_votes", the logic to incorporate votingapi_anonymous_window is:
if (!empty($criteria['vote_source']) && $anon_window > 0) {
However, $anon_window = 0 when it is set to "immediately". I propose this line of code be changed to:
if (!empty($criteria['vote_source']) && $anon_window >= 0) {
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | anon_immediate.patch | 503 bytes | floater |
Comments
Comment #1
floater commentedI had the same problem while using the Decisions module, and came to the same conclusion:
If the window is set to 0, criteria['timestamp'] is not set, resulting too many votes being returned.
Attached patch (with the same modification as above) works for me.
Comment #2
pgrond commentedSame for me. The above fix works for me also.
Comment #3
eaton commentedApplied to the D7 branch, will be backported to D6. Thanks!