diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-03-27 18:48:48 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-03-27 18:48:48 +0000 |
commit | 8e9d557ac83179d0c97a1b518965946856f1eac2 (patch) | |
tree | 452904cfda34ca4f81959caf338360259fc9fca0 /modules | |
parent | 3c1d5b9f3fbb43aabd3cd260a0d8c6c26d2ff79d (diff) | |
download | brdo-8e9d557ac83179d0c97a1b518965946856f1eac2.tar.gz brdo-8e9d557ac83179d0c97a1b518965946856f1eac2.tar.bz2 |
- Bugfix by Al.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/poll.module | 10 | ||||
-rw-r--r-- | modules/poll/poll.module | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/modules/poll.module b/modules/poll.module index 0061f219e..8538bf4a6 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -56,7 +56,7 @@ function poll_block($op = "list", $delta = 0) { poll_view($poll, 1, 1); } } - $block["subject"] = t("Latest poll: %t", array("%t" => $poll->title)); + $block["subject"] = t("Poll: %t", array("%t" => $poll->title)); $block["content"] = $poll->body; return $block; } @@ -239,9 +239,11 @@ function poll_system($field){ function poll_teaser($node) { // Create a simple teaser that lists all the choices - foreach ($node->choice as $k => $v) { - if ($v != "") { - $teaser .= "* $v\n"; + if (is_array($node->choice)) { + foreach ($node->choice as $k => $v) { + if ($v != "") { + $teaser .= "* $v\n"; + } } } return $teaser; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 0061f219e..8538bf4a6 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -56,7 +56,7 @@ function poll_block($op = "list", $delta = 0) { poll_view($poll, 1, 1); } } - $block["subject"] = t("Latest poll: %t", array("%t" => $poll->title)); + $block["subject"] = t("Poll: %t", array("%t" => $poll->title)); $block["content"] = $poll->body; return $block; } @@ -239,9 +239,11 @@ function poll_system($field){ function poll_teaser($node) { // Create a simple teaser that lists all the choices - foreach ($node->choice as $k => $v) { - if ($v != "") { - $teaser .= "* $v\n"; + if (is_array($node->choice)) { + foreach ($node->choice as $k => $v) { + if ($v != "") { + $teaser .= "* $v\n"; + } } } return $teaser; |