diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-06-08 20:17:00 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-06-08 20:17:00 +0000 |
commit | a722a1fed777f65f834418546927658c4dbdb3fa (patch) | |
tree | 394a88555c15147c7eff7c7fe844f3b9171c92e6 | |
parent | d41c4f23f16e12c05616761486f55481a9b38edf (diff) | |
download | brdo-a722a1fed777f65f834418546927658c4dbdb3fa.tar.gz brdo-a722a1fed777f65f834418546927658c4dbdb3fa.tar.bz2 |
Typoe
-rw-r--r-- | modules/poll.module | 4 | ||||
-rw-r--r-- | modules/poll/poll.module | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module index f4caebe8c..2918e8679 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -91,7 +91,9 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill = "#000000", $clrempty = "#ffffff") { +function poll_graph($val, $clrfill, $clrempty) { + $clrfill = $clrfill ? $clrfill : "#ffffff"; + $clrempty = $clrempty ? $clrempty : "#000000"; $p = round($val * 100); return "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" . ($p ? "<td width=\"" . $p . "%\" style=\"background-color: $clrfill;\"><span style=\"font-size: 4pt;\"> </span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\"> </span></td>":"") . "</tr></table>"; } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index f4caebe8c..2918e8679 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -91,7 +91,9 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill = "#000000", $clrempty = "#ffffff") { +function poll_graph($val, $clrfill, $clrempty) { + $clrfill = $clrfill ? $clrfill : "#ffffff"; + $clrempty = $clrempty ? $clrempty : "#000000"; $p = round($val * 100); return "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" . ($p ? "<td width=\"" . $p . "%\" style=\"background-color: $clrfill;\"><span style=\"font-size: 4pt;\"> </span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\"> </span></td>":"") . "</tr></table>"; } |