From 45d5aad6dfde192ef5b986f3233a41f15d035f24 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 24 May 2003 16:26:13 +0000 Subject: - Updated Drupal to use "on output" filters. Derived from Gerhard's patch. --- modules/poll.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/poll.module') diff --git a/modules/poll.module b/modules/poll.module index 81979e3d5..c4bdaa904 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -146,7 +146,7 @@ function poll_insert($node) { for ($i = 0; $i < $node->choices; $i++) { if ($node->choice[$i] != "") { - db_query("INSERT INTO poll_choices (nid, chtext, chvotes, chorder) VALUES (%d, '%s', %d, %d)", $node->nid, filter($node->choice[$i]), $node->chvotes[$i], $i); + db_query("INSERT INTO poll_choices (nid, chtext, chvotes, chorder) VALUES (%d, '%s', %d, %d)", $node->nid, $node->choice[$i], $node->chvotes[$i], $i); } } } @@ -263,7 +263,7 @@ function poll_view_voting(&$node, $main, $block, $links) { if ($node->choice) { foreach ($node->choice as $key => $value) { if ($value != "") { - $output .= "nid]\" value=\"$key\" /> $value
"; + $output .= "nid]\" value=\"$key\" />". filter($value) ."
"; } } } @@ -306,7 +306,7 @@ function poll_view_results(&$node, $main, $block, $links) { $width = round($node->chvotes[$key] * 100 / $votesmax); $percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1)); - $output .= "
$value
"; + $output .= "
". filter($value) ."
"; $output .= "
"; $output .= "
"; $output .= "
$percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."
"; @@ -379,7 +379,7 @@ function poll_update($node) { db_query("DELETE FROM poll_choices WHERE nid = %d", $node->nid); for ($i = 0; $i < $node->choices; $i++) { - $choice->chtext = filter($node->choice[$i]); + $choice->chtext = $node->choice[$i]; $choice->chvotes = (int)$node->chvotes[$i]; $choice->chorder = $i; -- cgit v1.2.3