Commit bf51896e authored by Dries's avatar Dries

- The introduction of the $page parameter for the node _view() hooks and

  the theme functions left the poll module's poll_view() function in a
  state where it does not display the poll results or vote forms on their
  own pages, since it uses another (proprietary) $block parameter to
  handle the case when the poll is rendered to be displayed in a block.
  Patch by Goba.
parent 6ab85955
......@@ -54,7 +54,7 @@ function poll_block($op = "list", $delta = 0) {
$poll = node_load(array("type" => "poll", "created" => $timestamp, "moderate" => "0", "status" => "1"));
if ($poll->nid) {
// Poll_view dumps the output into $poll->body
poll_view($poll, 1, 1);
poll_view($poll, 1, 0, 1);
}
}
$block["subject"] = t("Poll");
......@@ -347,7 +347,7 @@ function poll_view_processvote(&$node) {
}
}
function poll_view(&$node, $main = 0, $block = 0) {
function poll_view(&$node, $main = 0, $page = 0, $block = 0) {
global $user;
/*
......
......@@ -54,7 +54,7 @@ function poll_block($op = "list", $delta = 0) {
$poll = node_load(array("type" => "poll", "created" => $timestamp, "moderate" => "0", "status" => "1"));
if ($poll->nid) {
// Poll_view dumps the output into $poll->body
poll_view($poll, 1, 1);
poll_view($poll, 1, 0, 1);
}
}
$block["subject"] = t("Poll");
......@@ -347,7 +347,7 @@ function poll_view_processvote(&$node) {
}
}
function poll_view(&$node, $main = 0, $block = 0) {
function poll_view(&$node, $main = 0, $page = 0, $block = 0) {
global $user;
/*
......
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