From: Andrew Dolgov Date: Sun, 4 May 2008 04:19:19 +0000 (+0100) Subject: filter editor: show score_pic in params column X-Git-Tag: 1.2.23-final~157 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0966ea378b623a7b2fe5f20e4bdc39dac8c446ab;p=tt-rss.git filter editor: show score_pic in params column --- diff --git a/functions.php b/functions.php index 2366ce9c..449bb4e5 100644 --- a/functions.php +++ b/functions.php @@ -4918,6 +4918,8 @@ if ($score > 100) { $score_pic = "score_high.png"; + } else if ($score < -100) { + $score_pic = "score_low.png"; } else { $score_pic = "score_neutral.png"; } diff --git a/modules/pref-filters.php b/modules/pref-filters.php index bc5704b5..ce499767 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -303,7 +303,24 @@ $line["reg_exp"] = htmlspecialchars($line["reg_exp"]); if (!$line["feed_title"]) $line["feed_title"] = __("All feeds"); - if (!$line["action_param"]) $line["action_param"] = "—"; + + if (!$line["action_param"]) { + $line["action_param"] = "—"; + } else if ($line["action_name"] == "score") { + + if ($line["action_param"] > 100) { + $score_pic = "score_high.png"; + } else if ($line["action_param"] < -100) { + $score_pic = "score_low.png"; + } else { + $score_pic = "score_neutral.png"; + } + + $score_pic = ""; + + $line["action_param"] = "$score_pic " . $line["action_param"]; + + } $line["feed_title"] = htmlspecialchars($line["feed_title"]);