diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-07-24 12:33:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-07-24 12:33:57 +0000 |
commit | cbbc3e80c062caa4d9a74776733c79d1399cab2c (patch) | |
tree | 9393a236152447a7e905df9c1f49540d9970aca1 /modules | |
parent | 75512ae3dcd149a3bb8ee9df980484661460e507 (diff) | |
download | brdo-cbbc3e80c062caa4d9a74776733c79d1399cab2c.tar.gz brdo-cbbc3e80c062caa4d9a74776733c79d1399cab2c.tar.bz2 |
- Bugfix: made deleting polls work. Patch by Marco.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/poll.module | 2 | ||||
-rw-r--r-- | modules/poll/poll.module | 2 |
2 files changed, 2 insertions, 2 deletions
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; |