Posted by mcpuddin on November 3, 2009 at 1:09am
| Project: | Voting API |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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) {
Comments
#1
I 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.
#2
Same for me. The above fix works for me also.
#3
Applied to the D7 branch, will be backported to D6. Thanks!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.