Attached is a patch I put together which upgrades the Advanced Poll Converter to Drupal 6. I ran it on a site I'm putting together with ~1300 polls and it appears to have worked well, although I only spot-checked it. Still needs some closer review and testing.

Comments

ChrisKennedy’s picture

1300 polls... not too shabby :P Thanks for working on this. In the last modification did you have a reason for taking out the IP placeholder for manual votes?

gdd’s picture

Yeah I'm bringing an existing site into Drupal, and it has a lot user-generated content including polls that include HTML in the choices, which is what led me to advpoll.

The new votingapi_votes table doesn't include the hostname field anymore, so I pulled that out of the queries.

ChrisKennedy’s picture

Well it just got renamed to vote_source actually, to be a little more generic.

gdd’s picture

StatusFileSize
new4.66 KB

Ah hah! I did kind of whip through this pretty quick. New patch attached which restores the IP placeholder and renames the field in votingapi_votes.

ChrisKennedy’s picture

Status: Needs review » Needs work

I tested it out and db_next_id() doesn't exist in D6 - see http://drupal.org/node/114774#db_last_insert_id . Looks like we need to either use drupal_write_record, or more cleanly, votingapi_add_votes().

gdd’s picture

Status: Needs work » Needs review
StatusFileSize
new4.62 KB

Actually we don't need that at all anymore since D6 uses autoincrement fields to generate keys rather than db_next_id(). I don't know how I left that in, I'm sure I had removed it. Anyways, new patch attached.

ChrisKennedy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.