diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/poll.module | 7 | ||||
-rw-r--r-- | modules/poll/poll.module | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/poll.module b/modules/poll.module index 2597a2498..ba6a0250a 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -91,9 +91,10 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill, $clrempty) { - $clrfill = $clrfill ? $clrfill : "#ffffff"; - $clrempty = $clrempty ? $clrempty : "#000000"; +function poll_graph($val) { + global $theme; + $clrfill = $theme->foreground ? $theme->foreground : "#000000"; + $clrempty = $theme->background ? $theme->background : "#ffffff"; $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 2597a2498..ba6a0250a 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -91,9 +91,10 @@ function poll_help() { <?php } -function poll_graph($val, $clrfill, $clrempty) { - $clrfill = $clrfill ? $clrfill : "#ffffff"; - $clrempty = $clrempty ? $clrempty : "#000000"; +function poll_graph($val) { + global $theme; + $clrfill = $theme->foreground ? $theme->foreground : "#000000"; + $clrempty = $theme->background ? $theme->background : "#ffffff"; $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>"; } |