summaryrefslogtreecommitdiff
path: root/modules/pref-filters.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-12 21:54:07 +0300
committerAndrew Dolgov <[email protected]>2009-02-12 21:54:07 +0300
commita970edb1a28a5555776b81e9b8cc1db73c8ae98d (patch)
treec86e2d0b6387fdc5197b104027c7cbc5d28acb37 /modules/pref-filters.php
parente4541fae7318d3aab0749ca2125ab3f47a4aefa1 (diff)
prefs: display label color indicators in filters list
Diffstat (limited to 'modules/pref-filters.php')
-rw-r--r--modules/pref-filters.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/pref-filters.php b/modules/pref-filters.php
index f2e3832e2..e8e1cd60e 100644
--- a/modules/pref-filters.php
+++ b/modules/pref-filters.php
@@ -432,7 +432,25 @@
$filter_params = array(
"before" => __("before"),
"after" => __("after"));
-
+
+ if ($line["action_name"] == 'label') {
+
+ $tmp_result = db_query($link, "SELECT fg_color, bg_color
+ FROM ttrss_labels2 WHERE caption = '".
+ db_escape_string($line["action_param"])."' AND
+ owner_uid = " . $_SESSION["uid"]);
+
+ $fg_color = db_fetch_result($tmp_result, 0, "fg_color");
+ $bg_color = db_fetch_result($tmp_result, 0, "bg_color");
+
+ $tmp = "<div class='labelColorIndicator' id='LICID-$id'
+ style='color : $fg_color; background-color : $bg_color'>
+ &alpha;";
+ $tmp .= "</div>";
+
+ $line["action_param"] = "$tmp " . $line["action_param"];
+ }
+
if ($line["filter_type"] == 5) {
if (!strtotime($line["reg_exp"])) {