Posted by matt@antinomia on January 16, 2008 at 11:26pm
| Project: | Vote Up/Down |
| Version: | 6.x-1.0-beta6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | ingo86 |
| Status: | closed (fixed) |
Issue Summary
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 | Status | Test result | Operations |
|---|---|---|---|---|
| vote_up_down_reset_link.patch | 8.47 KB | Ignored: Check issue status. | None | None |
Comments
#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.
#9
Please don't use patch #7
here is a better variant
#10
I 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.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.