i'm trying to insert a fair few random anonymous votes programmatically calling this function directly.
the check
$uid = empty($uid) ? $user->uid : $uid;
is always TRUE and will always be set to the $user->uid when i pass in 0 for the uid. therefore only one vote will be counted (grr!)
so: here's a little patch to use is_null instead for the two checks.
| Comment | File | Size | Author |
|---|---|---|---|
| check.patch | 577 bytes | George2 |
Comments
Comment #1
George2 commentedComment #2
quicksketchI agree this is a bit of a problem, but this change won't have the effect you desire. Because Fivestar also checks based on IP address, you'll still only be able to register one vote as an anonymous user. Worse yet, this function is called all over the place, and since it doesn't have an $ip_address parameter, we'll need to update all the calls to this function.
Comment #3
whiteph commentedWe can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated. However, if a volunteer can be found who is willing to test patches for the Drupal 6 version, we could revert it to normal maintenance. See Help testing Drupal 6 patches.