Closed (fixed)
Project:
Election
Version:
7.x-1.x-dev
Component:
election_vote
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2014 at 16:27 UTC
Updated:
19 Dec 2015 at 01:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gausie commentedHere is my proposed change. There are no changes to existing API calls.
Comment #2
gausie commentedAh this does not work on latest. I will resubmit.
Comment #3
gausie commentedHere is the latest patch with useless things removed!
Comment #4
gausie commentedComment #5
pjcdawkins commentedComment #6
liam morlandReroll with comment indentation corrected.
Comment #7
liam morlandelection_vote_access_test() needs documentation.
Comment #8
pjcdawkins commentedOK. Every function needs at least a docblock describing the parameter and return types.
Comment #9
liam morlandInstead of creating a new function, it might be better to just add $chronological = TRUE as an argument to the existing function. That way, current calls will behave the same way and you can get the non-chronological version by passing in FALSE.
Comment #10
pjcdawkins commentedThis avoids issues with caching and with the hook.
Comment #11
pjcdawkins commentedOops, wrong var name
Comment #13
pjcdawkins commentedOops again.
Comment #14
liam morlandReading the code it looks fine. Does it matter that the "$grants[$post->post_id][$account->uid][$op] = FALSE;" line is not being run?
Comment #15
pjcdawkins commentedYes that was intentional - $grants is a static cache, and with this, the cache isn't involved in the cheap election-is-open check. If that was cached, we'd have to add $only_open to the cache key, which would be a bit of a headache.
Comment #16
pjcdawkins commentedCommitted (after 1 year...)