votingapi_set_votes() works fine when passing in an array of votes, but handling a single submission seems to be broken. The check for a single vote seems to be reversed. Adding a ! fixes the problem.
Index: votingapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/votingapi/votingapi.module,v
retrieving revision 1.46.2.1
diff -u -r1.46.2.1 votingapi.module
--- votingapi.module 18 Nov 2007 07:46:51 -0000 1.46.2.1
+++ votingapi.module 14 Jan 2008 21:28:12 -0000
@@ -131,7 +131,7 @@
*/
function votingapi_set_votes($votes = array(), $criteria = NULL) {
$touched = array();
- if (empty($votes['content_type'])) {
+ if (!empty($votes['content_type'])) {
$votes = array($votes);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | votingapi_votes_array.patch | 918 bytes | quicksketch |
Comments
Comment #1
quicksketchLooks like this patch was fixed but the same problem still exists for votingapi_add_votes() and votingapi_add_results(). The current CVS HEAD of Fivestar is now fully functional if you're looking for a module to test ;)
Comment #2
quicksketchEaton's already handled this one in CVS.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.