diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-05-24 16:26:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-05-24 16:26:13 +0000 |
commit | 45d5aad6dfde192ef5b986f3233a41f15d035f24 (patch) | |
tree | ba9364c6c2610498ba07e430925c868a6c9e45fa /modules/poll.module | |
parent | 17e5b5c2d792fea207173c23bb76636297a21a03 (diff) | |
download | brdo-45d5aad6dfde192ef5b986f3233a41f15d035f24.tar.gz brdo-45d5aad6dfde192ef5b986f3233a41f15d035f24.tar.bz2 |
- Updated Drupal to use "on output" filters. Derived from Gerhard's patch.
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 8 |
1 files changed, 4 insertions, 4 deletions
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 .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" /> $value<br />"; + $output .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."<br />"; } } } @@ -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 .= "<div class=\"poll-text\">$value</div>"; + $output .= "<div class=\"poll-text\">". filter($value) ."</div>"; $output .= "<div style=\"float:left; width:". $width ."%; height: 1em;\" class=\"poll-foreground\"></div>"; $output .= "<div style=\"float:left; width:". (100 - $width) ."%; height: 1em;\" class=\"poll-background\"></div>"; $output .= "<div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div>"; @@ -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; |