error_reporting (0);
$tmp_result = db_query($link, "SELECT count(id) as count FROM ttrss_entries
- WHERE " . $line["sql_exp"]);
+ WHERE (" . $line["sql_exp"] . ") AND unread = true");
$count = db_fetch_result($tmp_result, 0, "count");
error_reporting (0);
$tmp_result = db_query($link, "SELECT count(id) as count FROM ttrss_entries
- WHERE " . $line["sql_exp"]);
+ WHERE (" . $line["sql_exp"] . ") AND unread = true");
$count = db_fetch_result($tmp_result, 0, "count");
+
+ $class = "odd";
+
+ if ($count > 0) {
+ $class .= "Unread";
+ }
error_reporting (E_ERROR | E_WARNING | E_PARSE);
printFeedEntry(-$line["id"]-11,
- "odd", $line["description"], $count, "images/label.png");
+ $class, $line["description"], $count, "images/label.png");
}
}
var feedctr = f_document.getElementById("FEEDCTR-" + id);
var feedu = f_document.getElementById("FEEDU-" + id);
+ var feedr = f_document.getElementById("FEEDR-" + id);
feedu.innerHTML = ctr;
if (ctr > 0) {
feedctr.className = "odd";
+ if (!feedr.className.match("Unread") && id != -1) {
+ feedr.className = feedr.className + "Unread";
+ }
} else {
feedctr.className = "invisible";
- }
+ feedr.className = feedr.className.replace("Unread", "");
+ }
}
}
}
if (ctr > 0) {
feedctr.className = "odd";
- if (id > 0 && !feedr.className.match("Unread")) {
+ if (id != -1 && !feedr.className.match("Unread")) {
feedr.className = feedr.className + "Unread";
}
} else {