From: Andrew Dolgov Date: Sat, 30 Sep 2006 07:29:22 +0000 (+0100) Subject: show last article date in pref feeds X-Git-Tag: 1.2.4~64 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=76efee8f3ee49ec17b62198aae81431a49371c2b;p=tt-rss.git show last article date in pref feeds --- diff --git a/backend.php b/backend.php index bbc62e13..a921d75d 100644 --- a/backend.php +++ b/backend.php @@ -1498,7 +1498,10 @@ F2.title AS parent_title, C1.title AS category, F1.hidden, - F1.include_in_digest + F1.include_in_digest, + (SELECT SUBSTRING(MAX(updated),1,16) FROM ttrss_user_entries, + ttrss_entries WHERE ref_id = ttrss_entries.id + AND feed_id = F1.id) AS last_article FROM ttrss_feeds AS F1 LEFT JOIN ttrss_feeds AS F2 @@ -1531,7 +1534,8 @@ print " Title - Feed + Feed + Last Article Updated"; } @@ -1561,6 +1565,15 @@ $last_updated = date($short_date, strtotime($last_updated)); } + $last_article = $line["last_article"]; + + if (get_pref($link, 'HEADLINES_SMART_DATE')) { + $last_article = smart_date_time(strtotime($last_article)); + } else { + $short_date = get_pref($link, 'SHORT_DATE_FORMAT'); + $last_article = date($short_date, strtotime($last_article)); + } + if (get_pref($link, 'ENABLE_FEED_CATS') && $cur_cat_id != $cat_id) { $lnum = 0; @@ -1573,8 +1586,9 @@ print " "; } - print "Title - Feed + print "Title + Feed + Last Article Updated"; $cur_cat_id = $cat_id; @@ -1621,6 +1635,9 @@ print "" . $edit_link . ""; + print "" . + "$last_article"; + print "" . "$last_updated";