From a597354bcb48536f2c7633d53c78fa931b186c20 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 31 May 2005 21:14:27 +0000 Subject: - Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for tags. --- modules/poll/poll.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/poll') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index a9139a2b8..412144023 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -95,11 +95,12 @@ function poll_validate(&$node) { if (isset($node->title)) { // Check for at least two options and validate amount of votes: $realchoices = 0; + // Renumber fields + $node->choice = array_values($node->choice); foreach ($node->choice as $i => $choice) { if ($choice['chtext'] != '') { $realchoices++; } - if ($choice['chvotes'] < 0) { form_set_error("choice][$i][chvotes", t('Negative values are not allowed.')); } -- cgit v1.2.3