summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/poll.module b/modules/poll.module
index d08d949dc..26d01c421 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -28,9 +28,9 @@ function poll_block() {
function poll_cron() {
// Close polls that have exceeded their allowed runtime
- $result = db_query("SELECT p.lid FROM poll p LEFT JOIN node n ON p.nid=n.nid WHERE (n.created + p.runtime) < '" . time() . "' AND p.active = '1' AND p.runtime != '0'");
+ $result = db_query("SELECT p.nid FROM poll p LEFT JOIN node n ON p.nid=n.nid WHERE (n.created + p.runtime) < '" . time() . "' AND p.active = '1' AND p.runtime != '0'");
while ($poll = db_fetch_object($result)) {
- db_query("UPDATE poll SET active='0' WHERE lid='$poll->lid'");
+ db_query("UPDATE poll SET active='0' WHERE nid='$poll->nid'");
}
}
@@ -43,7 +43,7 @@ function poll_form(&$node, &$help, &$error) {
$admin = user_access("administer nodes");
$_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 => "Closed", 1 => "Active");
+ $_active = array(0 => t("Closed"), 1 => t("Active"));
$node->choices = $node->choices ? $node->choices : max(2, count($node->choices) ? count($node->choices) : 5);
@@ -90,7 +90,7 @@ function poll_form(&$node, &$help, &$error) {
}
function poll_help() {
- ?>
+ ?><p>Drupal's poll module allows users to submit multiple-choice questions that others can vote on.</p>
<?php
}