]> git.wh0rd.org Git - tt-rss.git/commitdiff
feed details now actually shows latest headlines, not first ones
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 10:42:57 +0000 (11:42 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 10:42:57 +0000 (11:42 +0100)
backend.php

index da97e097c2c8aa2e83216222129026b2b6545006..22fc434bb2d5f80d782f5270d4a3bd89b34a94fc 100644 (file)
 
                print "</table>";
 
-               $result = db_query($link, "SELECT title,updated 
+               $result = db_query($link, "SELECT title,updated,unread
                        FROM ttrss_entries,ttrss_user_entries
                        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) {
 
                        print "<ul class=\"nomarks\">";
        
                        while ($line = db_fetch_assoc($result)) {
+                               if ($line["unread"] == "t" || $line["unread"] == "1") {
+                                       $line["title"] = "<b>" . $line["title"] . "</b>";
+                               }                               
                                print "<li>" . $line["title"].
                                "&nbsp;<span class=\"insensitive\">(" .$line["updated"].")</span></li>";
                        }