Commit 8e9d557a authored by Dries's avatar Dries

- Bugfix by Al.

parent 3c1d5b9f
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment