display label colors in headlines subtoolbar

This commit is contained in:
Andrew Dolgov 2009-12-25 16:10:14 +03:00
parent 29096c6d0b
commit 5163fc709e
1 changed files with 21 additions and 1 deletions

View File

@ -4051,7 +4051,27 @@
print "<a $target href=\"$feed_site_url\">". print "<a $target href=\"$feed_site_url\">".
truncate_string($feed_title,30)."</a>"; truncate_string($feed_title,30)."</a>";
} else { } else {
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 $feed_title;
print "</span>";
} else {
print $feed_title;
}
} else {
print $feed_title;
}
} }
if ($search) { if ($search) {