Only show 'Reset vote' link if user has voted on node/comment
matt@antinomia - January 16, 2008 - 23:26
| Project: | Vote Up/Down |
| Version: | 6.x-1.0-beta6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | ingo86 |
| Status: | needs review |
Description
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.
| Attachment | Size |
|---|---|
| vote_up_down_reset_link.patch | 8.47 KB |

#1
Rerolled against -dev. Also cleaned up patch, removing vote_up_down_hasvoted() in favor of VotingAPI's votingapi_get_user_votes() which does the same.
#2
Instead of having the 'Reset vote' link, would it be better to allow resetting a vote (if present) through the voting vidget?
#3
#4
This patch work for 5.x.
It is necessary for version 6.x too but in 6.x other functions
#5
Fixed!
#6
err, wrong fix. Sorry :-/
#7
patch for 6.x-1.0
#8
Will look to add this patch asap. Stay tuned for beta7.