summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2002-05-11 13:56:31 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2002-05-11 13:56:31 +0000
commitcd19768bf1350f02c88b2edc53d2b61cfcc18606 (patch)
treea95b7ebef20a0298435c387f4323c17a0142b3c7 /modules/poll.module
parent30066738c612ce06290260ffd034be1bdae37d8d (diff)
downloadbrdo-cd19768bf1350f02c88b2edc53d2b61cfcc18606.tar.gz
brdo-cd19768bf1350f02c88b2edc53d2b61cfcc18606.tar.bz2
Poll.module:
- Fixed edit form not defaulting to the correct amount of choices.
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module
index 9d9b16f76..4f2765bee 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -45,7 +45,7 @@ function poll_form(&$node, &$help, &$error) {
$_duration = array(0 => t("Unlimited"), 86400 => format_interval(86400), 172800 => format_interval(172800), 345600 => format_interval(345600), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200), 4838400 => format_interval(4838400), 9676800 => format_interval(9676800), 31536000 => format_interval(31536000));
$_active = array(0 => t("Closed"), 1 => t("Active"));
- $node->choices = $node->choices ? $node->choices : max(2, count($node->choices) ? count($node->choices) : 5);
+ $node->choices = $node->choices ? $node->choices : max(2, count($node->choice) ? count($node->choice) : 5);
if (isset($node->title)) {
// Check for at least two options and validate amount of votes:
@@ -263,7 +263,7 @@ function poll_view(&$node, $main = 0, $block = 0) {
}
}
}
- $output .= "<br /><div align=\"center\">Total votes: ". $votestotal ."</div>";
+ $output .= "<br /><div align=\"center\">Total votes: ". $votestotal . ($block ? "<br />" . $theme->links(link_node($node, 1)) : "") ."</div>";
}
// Force the output on both the mainpage and elsewhere
$node->body = $output;