How to reproduce:
- Create a node
- Vote +1 on it
- Watch author karma increase by 1
- Reset the vote*
- Watch author karma not being updated accordingly
* By "vote reset" I mean a votingapi_unset_vote() call by the voting module -- not casting an opposite vote. This is how I've seen voting modules implement the "reset vote" function, and it's the correct thing to do, IMHO.
The fix is straighforward (though sorry for not providing a patch): implement hook_votingapi_delete() so that the module can catch vote resets.
Comments
Comment #1
mercmobily commentedHi,
OK, done.
This will be in the DRUPAL-5 branch tonight.
However,
*** this branch needs serious testing ***
It's basically a rewrite of user_karma, based on a nice plugin architecture. Right now we can assign karma for _any_ reason and it's about a million times more flexible.
I am doing initial testing right now.
I would be immensely grateful if you could test the new karma module ON A DEV SERVER. There is just so much to test, and pretty much everything was rewritten.
This is the module as I had planned to write it. I didn't do it right away because I was in a hurry to get Drigg out of the door -- so I got user_karma to do exactly what I needed to. However, this new version will do whatever anybody wants to.
Bye,
Merc.