]> git.wh0rd.org Git - tt-rss.git/commitdiff
tweak score display
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 5 May 2008 06:27:29 +0000 (07:27 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 5 May 2008 06:27:29 +0000 (07:27 +0100)
functions.php

index 3c85db1c32f6fde2654e4cb1ebe74c348b67aba1..30a6393447e8ea8933ff11d93994141eac6aa840 100644 (file)
 
                                $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)");
 
 
                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"; 
+               }
+       }
 ?>