From: Andrew Dolgov Date: Mon, 5 May 2008 06:27:29 +0000 (+0100) Subject: tweak score display X-Git-Tag: 1.2.23-final~148 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1e36af0c1c3538de7b33b35b60aab72fc44f3493;p=tt-rss.git tweak score display --- diff --git a/functions.php b/functions.php index 3c85db1c..30a63934 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"; + } + } ?>