summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-03-27 18:48:48 +0000
committerDries Buytaert <dries@buytaert.net>2003-03-27 18:48:48 +0000
commit8e9d557ac83179d0c97a1b518965946856f1eac2 (patch)
tree452904cfda34ca4f81959caf338360259fc9fca0 /modules/poll.module
parent3c1d5b9f3fbb43aabd3cd260a0d8c6c26d2ff79d (diff)
downloadbrdo-8e9d557ac83179d0c97a1b518965946856f1eac2.tar.gz
brdo-8e9d557ac83179d0c97a1b518965946856f1eac2.tar.bz2
- Bugfix by Al.
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module10
1 files changed, 6 insertions, 4 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;