I'm working on a system using vote up down that needs to only react to a vote changing. The voteapi hooks: hook_votingapi_insert($vote) and hook_votingapi_delete($vote) are insufficient because you don't have all the information in either hook. (voteapi used to have a hook_votingapi_update but that seems to no longer exist).
To accomplish this I changed the vote_up_down_vote function to detect a change of an existing vote and call hook_vote_up_down_change($oldvote, $newvote).
| Comment | File | Size | Author |
|---|---|---|---|
| vote_up_down.patch | 647 bytes | petermallett |
Comments
Comment #1
marvil07 commentedsorry, I think there will be no more new features for 1.x, moving to 2.x and changing status accordingly
Comment #2
marvil07 commentedAfter reading a related issue on the votingapi issue queue: #311657: Important: hook_votingapi_update needed for Drigg and User Karma!, I think we can implement this new hook if it do not affect performance too much.
Starting the review, I see it only include an extra call to a votingapi function, and I following it, I see many php functions called by it and only one sql query.
moving to 3.x to test it enough before commit, BTW I just committed a new hook_vud.php file(#833030: Document hooks) that need to be updated too.
Comment #3
marvil07 commentedNo more feature requests for 6.x-3.x now that it is the stable branch, moving to 7.x-1.x as postponed until basic port is ready.
Comment #4
marvil07 commented