diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-05-31 21:14:27 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-05-31 21:14:27 +0000 |
commit | a597354bcb48536f2c7633d53c78fa931b186c20 (patch) | |
tree | 34e16a5b178faf3047963cddfdec084bfeceb8cb /modules/poll | |
parent | 025bca28aa1717459c811744704e0c1b514d1e1e (diff) | |
download | brdo-a597354bcb48536f2c7633d53c78fa931b186c20.tar.gz brdo-a597354bcb48536f2c7633d53c78fa931b186c20.tar.bz2 |
- Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for <link> tags.
Diffstat (limited to 'modules/poll')
-rw-r--r-- | modules/poll/poll.module | 3 |
1 files changed, 2 insertions, 1 deletions
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.')); } |