From: Andrew Dolgov Date: Fri, 31 Aug 2012 11:40:19 +0000 (+0400) Subject: show label color indicators in pref-filters X-Git-Tag: 1.6.0~90 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=84d9750edcb52602a0e69b52df73a93a54d585c8;p=tt-rss.git show label color indicators in pref-filters --- diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 2ed46435..53f7d396 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -109,6 +109,8 @@ class Pref_Filters extends Handler_Protected { $filter_search = $_SESSION["prefs_filter_search"]; $result = db_query($this->link, "SELECT *, + (SELECT action_param FROM ttrss_filters2_actions + WHERE filter_id = ttrss_filters2.id ORDER BY id LIMIT 1) AS action_param, (SELECT action_id FROM ttrss_filters2_actions WHERE filter_id = ttrss_filters2.id ORDER BY id LIMIT 1) AS action_id, (SELECT description FROM ttrss_filter_actions @@ -153,6 +155,19 @@ class Pref_Filters extends Handler_Protected { } } + if ($line['action_id'] == 7) { + $label_result = db_query($this->link, "SELECT fg_color, bg_color + FROM ttrss_labels2 WHERE caption = '".db_escape_string($line['action_param'])."' AND + owner_uid = " . $_SESSION["uid"]); + + if (db_num_rows($label_result) > 0) { + $fg_color = db_fetch_result($label_result, 0, "fg_color"); + $bg_color = db_fetch_result($label_result, 0, "bg_color"); + + $name[1] = "α" . $name[1]; + } + } + $filter = array(); $filter['id'] = 'FILTER:' . $line['id']; $filter['bare_id'] = $line['id'];