Would be nice to have a votingapi handler, just like we have a flag one :)
Attaching one. Totally untested. Planning to give it some more love tomorrow.
As you can see, it recalculates the voting results only after the import/rollback is done, for better performance.
Wasn't sure whether to support migrating to all content types (as it is now), or to accept the content type in the constructor and limit to that one only.
(In any case, if it's missing, we assume the default, which is "node").
And if the content type is in the constructor, is it then listed in fields()?
Let me know your thoughts.
Comments
Comment #1
bojanz commentedHuh. Forgot about this one.
Attaching a working version.
Comment #2
moshe weitzman commentedCommitted to D6 and D7. I did not test this yet, but I will. I commented out a little code in bulkRollback which looked wrong. Also, we should ideally use votingapi_delete_votes(). I implemented that for D7 but did not touch D6. Is there a reason that you did not do that?
Comment #3
bojanz commentedTo be honest, I no longer remember. It was written for a D6 project that got launched at the beginning of february...