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) {

CommentFileSizeAuthor
#1 anon_immediate.patch503 bytesfloater

Comments

floater’s picture

Status: Active » Needs review
StatusFileSize
new503 bytes

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.

pgrond’s picture

Same for me. The above fix works for me also.

eaton’s picture

Status: Needs review » Fixed

Applied to the D7 branch, will be backported to D6. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.