From cbbc3e80c062caa4d9a74776733c79d1399cab2c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 24 Jul 2003 12:33:57 +0000 Subject: - Bugfix: made deleting polls work. Patch by Marco. --- modules/poll.module | 2 +- modules/poll/poll.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/poll.module b/modules/poll.module index 07786b295..a9a057478 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -369,7 +369,7 @@ function poll_update($node) { db_query("UPDATE {poll} SET runtime = %d, active = %d WHERE nid = %d", $node->runtime, $node->active, $node->nid); db_query("DELETE FROM {poll_choices} WHERE nid = %d", $node->nid); - for ($i = 0; $i < $node->choices; $i++) { + for ($i = 0; $i < count($node->choice); $i++) { $choice->chtext = $node->choice[$i]; $choice->chvotes = (int)$node->chvotes[$i]; $choice->chorder = $i; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 07786b295..a9a057478 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -369,7 +369,7 @@ function poll_update($node) { db_query("UPDATE {poll} SET runtime = %d, active = %d WHERE nid = %d", $node->runtime, $node->active, $node->nid); db_query("DELETE FROM {poll_choices} WHERE nid = %d", $node->nid); - for ($i = 0; $i < $node->choices; $i++) { + for ($i = 0; $i < count($node->choice); $i++) { $choice->chtext = $node->choice[$i]; $choice->chvotes = (int)$node->chvotes[$i]; $choice->chorder = $i; -- cgit v1.2.3