summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-05-05 07:27:29 +0100
committerAndrew Dolgov <[email protected]>2008-05-05 07:27:29 +0100
commit1e36af0c1c3538de7b33b35b60aab72fc44f3493 (patch)
tree86c8fb51e2e70907cd5725484051fcedcddb8db5 /functions.php
parent9617eb94042e3bf47be834340de03ee85455920c (diff)
tweak score display
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/functions.php b/functions.php
index 3c85db1c3..30a639344 100644
--- a/functions.php
+++ b/functions.php
@@ -4924,13 +4924,7 @@
$score = $line["score"];
- if ($score > 100) {
- $score_pic = "score_high.png";
- } else if ($score < -100) {
- $score_pic = "score_low.png";
- } else {
- $score_pic = "score_neutral.png";
- }
+ $score_pic = get_score_pic($score);
$score_title = __("(Click to change)");
@@ -5539,4 +5533,14 @@
return $filters;
}
+
+ function get_score_pic($score) {
+ if ($score > 0) {
+ return "score_high.png";
+ } else if ($score < 0) {
+ return "score_low.png";
+ } else {
+ return "score_neutral.png";
+ }
+ }
?>