From e3f1c92d261a899ff319c490d3c307edf3978f54 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sat, 22 Jan 2005 09:02:17 +0000
Subject: [PATCH] - Patch #14936 by Goba:

   + The "add new comment" was missing for polls.

   + Renames $main to $teaser where appropriate to follow latest Drupal conventions.
---
 modules/poll.module      | 10 +++++-----
 modules/poll/poll.module | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/poll.module b/modules/poll.module
index dc8e517e6aba..84463bfb2dc3 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -299,7 +299,7 @@ function poll_teaser($node) {
 /**
  * Generates the voting form for a poll.
  */
-function poll_view_voting(&$node, $main, $page, $block) {
+function poll_view_voting(&$node, $teaser, $page, $block) {
   $output = '<div class="poll">';
 
   $form = '<div class="vote-form">';
@@ -324,7 +324,7 @@ function poll_view_voting(&$node, $main, $page, $block) {
 /**
  * Generates a graphical representation of the results of a poll.
  */
-function poll_view_results(&$node, $main, $page, $block) {
+function poll_view_results(&$node, $teaser, $page, $block) {
   // Display the results
 
   // Count the votes and find the maximum
@@ -415,10 +415,10 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
   $output = '';
 
   if ($node->allowvotes && ($block || arg(2) != 'results')) {
-    $output .= poll_view_voting($node, $main, $page, $block);
+    $output .= poll_view_voting($node, $teaser, $page, $block);
   }
   else {
-    $output .= poll_view_results($node, $main, $page, $block);
+    $output .= poll_view_results($node, $teaser, $page, $block);
   }
 
   // Special display for side-block
@@ -426,7 +426,7 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
     // No 'read more' link
     $node->body = $node->teaser = '';
 
-    $links = module_invoke_all('link', 'node', $node, 0);
+    $links = module_invoke_all('link', 'node', $node, 1);
     $links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
     if ($node->allowvotes && $block) {
       $links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index dc8e517e6aba..84463bfb2dc3 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -299,7 +299,7 @@ function poll_teaser($node) {
 /**
  * Generates the voting form for a poll.
  */
-function poll_view_voting(&$node, $main, $page, $block) {
+function poll_view_voting(&$node, $teaser, $page, $block) {
   $output = '<div class="poll">';
 
   $form = '<div class="vote-form">';
@@ -324,7 +324,7 @@ function poll_view_voting(&$node, $main, $page, $block) {
 /**
  * Generates a graphical representation of the results of a poll.
  */
-function poll_view_results(&$node, $main, $page, $block) {
+function poll_view_results(&$node, $teaser, $page, $block) {
   // Display the results
 
   // Count the votes and find the maximum
@@ -415,10 +415,10 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
   $output = '';
 
   if ($node->allowvotes && ($block || arg(2) != 'results')) {
-    $output .= poll_view_voting($node, $main, $page, $block);
+    $output .= poll_view_voting($node, $teaser, $page, $block);
   }
   else {
-    $output .= poll_view_results($node, $main, $page, $block);
+    $output .= poll_view_results($node, $teaser, $page, $block);
   }
 
   // Special display for side-block
@@ -426,7 +426,7 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
     // No 'read more' link
     $node->body = $node->teaser = '';
 
-    $links = module_invoke_all('link', 'node', $node, 0);
+    $links = module_invoke_all('link', 'node', $node, 1);
     $links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
     if ($node->allowvotes && $block) {
       $links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
-- 
GitLab