[drupal-devel] [bug] Poll not properly updating who voted

cprice drupal-devel at drupal.org
Wed Mar 9 05:35:50 UTC 2005

Issue status update for http://drupal.org/node/18597

 Project:      Drupal
 Version:      cvs
 Component:    poll.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  cprice
 Updated by:   cprice
 Status:       patch
 Attachment:   http://drupal.org/files/issues/poll_polled.patch (1.74 KB)

Apparently there is some contention between the queue module and the
poll module, so this is only a problem when both modules are enabled.
Both modules use a node->voters variable.  The queue module defines
this as an array, while the poll module defines this as a string.  This
causes the poll module to only update the poll.voted column with the
last user that has voted, so this only disallows the latest voter as
the poll.voted column's data is overwritten after each vote.
The best possible fix would probably be to rename the poll.voted column
to poll.polled and update the code accordingly.  As an interim, I
propose the following patch which modifies the query to SELECT votes as
polled.  This also modifies relevant code to use node->polled instead of
node->voted.  If the database is modified to accomodate the poll.polled
column instead of the poll.voted column, this would then require
minimal code change to sync the code to the database.


More information about the drupal-devel mailing list