summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-25 16:10:14 +0300
committerAndrew Dolgov <[email protected]>2009-12-25 16:10:14 +0300
commit5163fc709e36417352cb56293e3bdd7aa1b989aa (patch)
treed838edbcb77278e942c3f29c005728ab3fe7d36b
parent29096c6d0b75b9629628b03fc05f383674a1cb84 (diff)
display label colors in headlines subtoolbar
-rw-r--r--functions.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 378242cb2..0c23e7ec7 100644
--- a/functions.php
+++ b/functions.php
@@ -4051,7 +4051,27 @@
print "<a $target href=\"$feed_site_url\">".
truncate_string($feed_title,30)."</a>";
} else {
- print $feed_title;
+ if ($feed_id < -10) {
+ $label_id = -11-$feed_id;
+
+ $result = db_query($link, "SELECT fg_color, bg_color
+ FROM ttrss_labels2 WHERE id = '$label_id' AND owner_uid = " .
+ $_SESSION["uid"]);
+
+ if (db_num_rows($result) != 0) {
+ $fg_color = db_fetch_result($result, 0, "fg_color");
+ $bg_color = db_fetch_result($result, 0, "bg_color");
+
+ print "<span style='background : $bg_color; color : $fg_color'>";
+ print $feed_title;
+ print "</span>";
+ } else {
+ print $feed_title;
+ }
+
+ } else {
+ print $feed_title;
+ }
}
if ($search) {