summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2001-06-09 19:31:34 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2001-06-09 19:31:34 +0000
commit959b77c3fa9b602cf50722c0c2b5aa2c08b59e99 (patch)
treea66836f1668cf51e6c9d307e0a507196a18b662a /modules/poll/poll.module
parent0e2fc70e3da74596b30b83832ae8dd0260154674 (diff)
downloadbrdo-959b77c3fa9b602cf50722c0c2b5aa2c08b59e99.tar.gz
brdo-959b77c3fa9b602cf50722c0c2b5aa2c08b59e99.tar.bz2
- Added $theme->foreground and $theme->background vars to provide some general usable colors outside of a theme.
- Updated poll.module to use the new $theme color variables
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module7
1 files changed, 4 insertions, 3 deletions
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;\">&nbsp;</span></td>" : "") . ($p < 100 ? "<td style=\"background-color: $clrempty;\" width=\"" . (100 - $p) . "%\"><span style=\"font-size: 4pt;\">&nbsp;</span></td>":"") . "</tr></table>";
}