Closed (fixed)
Project:
Vote Up/Down
Version:
6.x-1.0-beta6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Jan 2008 at 23:26 UTC
Updated:
9 Jul 2010 at 05:50 UTC
Jump to comment: Most recent file
This patch creates a helper function vote_up_down_hasvoted() to check if the user has already voted on a node/comment. If not, it hides the 'Reset vote' link.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | only-show-reset-if-voted-1.x.patch | 3.78 KB | marvil07 |
| #10 | only-show-reset-if-voted-2.x-3.x.patch | 3.11 KB | marvil07 |
| #9 | vote_up_down.module.patch | 3.23 KB | quotesbro |
| #7 | vote_up_down.module.patch | 2.43 KB | quotesbro |
| #1 | vote_up_down_reset_link.patch | 1.78 KB | matt@antinomia |
Comments
Comment #1
matt@antinomia commentedRerolled against -dev. Also cleaned up patch, removing vote_up_down_hasvoted() in favor of VotingAPI's votingapi_get_user_votes() which does the same.
Comment #2
kirie commentedInstead of having the 'Reset vote' link, would it be better to allow resetting a vote (if present) through the voting vidget?
Comment #3
quotesbro commentedComment #4
quotesbro commentedThis patch work for 5.x.
It is necessary for version 6.x too but in 6.x other functions
Comment #5
lut4rp commentedFixed!
Comment #6
lut4rp commentederr, wrong fix. Sorry :-/
Comment #7
quotesbro commentedpatch for 6.x-1.0
Comment #8
ingo86 commentedWill look to add this patch asap. Stay tuned for beta7.
Comment #9
quotesbro commentedPlease don't use patch #7
here is a better variant
Comment #10
marvil07 commentedI made three changes:
- Since #544962: use votingapi for uid criteria, there is no more
_vote_up_down_get_uid(), in favour ofvotingapi_current_user_identifier()- Fix data member for comment, cid instead of nid.
- Use explicitly
is_null()at the conditionalThen, I commited this to 1.x, port this to 2.x/3.x and commit it also to 2.x/3.x.