From d9cb4522bd0f445eef49316a5c9dd798e2803754 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 15 Sep 2003 15:58:20 +0000 Subject: - Book module improvements. This commit changes the behavior of the "view" hook. See mailing list for details; search for a mail with the subject: '[IMPORTANT] behavior of "view" hook changed'. Modified patch from Nick. --- modules/poll/poll.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/poll/poll.module') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index a9a057478..bdf7a2ea1 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -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: %t", array("%t" => $poll->title)); @@ -325,7 +325,7 @@ function poll_view_processvote(&$node) { } } -function poll_view(&$node, $main = 0, $block = 0) { +function poll_view(&$node, $main = 0, $return = 0, $block = 0) { global $user; /* @@ -361,7 +361,7 @@ function poll_view(&$node, $main = 0, $block = 0) { // We also use poll_view() for the side-block if (!$block) { - theme("node", $node, $main); + return $node; } } -- cgit v1.2.3