summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-01-21 22:44:25 +0000
committerDries Buytaert <dries@buytaert.net>2003-01-21 22:44:25 +0000
commit9a23223e253d95377123a9b4b49a54cc8cdbe744 (patch)
treef3817e25046234ada392e4c5ed1aa0d1177db454 /modules/poll.module
parentef0acbf2ddbfdfb8d639c317b82fa40daa6e1c5b (diff)
downloadbrdo-9a23223e253d95377123a9b4b49a54cc8cdbe744.tar.gz
brdo-9a23223e253d95377123a9b4b49a54cc8cdbe744.tar.bz2
- Applied Ori's format_plural() patch; see mailing list for details.
NOTE: some modules in the contributions repository might need to be updated.
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module
index 90b23cda3..b4298f099 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -221,7 +221,7 @@ function poll_page() {
$result = db_query("SELECT n.nid, n.title, p.active, SUM(c.chvotes) AS votes FROM node n LEFT JOIN poll p ON n.nid=p.nid LEFT JOIN poll_choices c ON n.nid=c.nid WHERE type = 'poll' AND status = '1' AND moderate = '0' GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC");
$output = "<ul>";
while ($node = db_fetch_object($result)) {
- $output .= "<li>". l($node->title, "node/view/$node->nid") ." - ". format_plural($node->votes, "vote", "votes") ." - ". ($node->active ? t("open") : t("closed")) ."</li>";
+ $output .= "<li>".l($node->title, "node/view/$node->nid") ." - ". format_plural($node->votes, "1 vote", "%count votes") ." - ". ($node->active ? t("open") : t("closed")) ."</li>";
}
$output .= "</ul>";
$theme->box(t("Polls"), $output);
@@ -328,7 +328,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 .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td>$value</td><td><div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "vote", "votes") .")" : "") ."</div></td></tr></table>";
+ $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td>$value</td><td><div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div></td></tr></table>";
if ($width == 0) {
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\"><tr><td class=\"pollbg\" width=\"100%\">&nbsp;</td></tr></table>";
}