feed details now actually shows latest headlines, not first ones

This commit is contained in:
Andrew Dolgov 2005-11-20 11:42:57 +01:00
parent 5951ded1d1
commit c565e1ef9e
1 changed files with 5 additions and 2 deletions

View File

@ -2221,10 +2221,10 @@
print "</table>"; print "</table>";
$result = db_query($link, "SELECT title,updated $result = db_query($link, "SELECT title,updated,unread
FROM ttrss_entries,ttrss_user_entries FROM ttrss_entries,ttrss_user_entries
WHERE ref_id = id AND feed_id = '$feed_id' WHERE ref_id = id AND feed_id = '$feed_id'
ORDER BY date_entered LIMIT 5"); ORDER BY date_entered DESC LIMIT 5");
if (db_num_rows($result) > 0) { if (db_num_rows($result) > 0) {
@ -2233,6 +2233,9 @@
print "<ul class=\"nomarks\">"; print "<ul class=\"nomarks\">";
while ($line = db_fetch_assoc($result)) { while ($line = db_fetch_assoc($result)) {
if ($line["unread"] == "t" || $line["unread"] == "1") {
$line["title"] = "<b>" . $line["title"] . "</b>";
}
print "<li>" . $line["title"]. print "<li>" . $line["title"].
"&nbsp;<span class=\"insensitive\">(" .$line["updated"].")</span></li>"; "&nbsp;<span class=\"insensitive\">(" .$line["updated"].")</span></li>";
} }