diff options
author | Andrew Dolgov <[email protected]> | 2010-12-28 11:39:12 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-12-28 11:39:12 +0300 |
commit | 1644304f114626466dd45940ea21f6892efacebb (patch) | |
tree | a152759e559c497b5266b9ef2f371811f83d1b83 /modules | |
parent | 5823f9fbabb610a487b5d50a1a81b33445cfb881 (diff) |
display last update times in PrefFeedTree (closes #284)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pref-feeds.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index f97c6987a..66902d441 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -55,7 +55,8 @@ $cat['items'] = array(); $cat['type'] = 'category'; - $feed_result = db_query($link, "SELECT id, title, last_error + $feed_result = db_query($link, "SELECT id, title, last_error, + ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated FROM ttrss_feeds WHERE cat_id = '".$line['id']."' AND owner_uid = ".$_SESSION["uid"]. " ORDER BY order_id, title"); @@ -68,6 +69,8 @@ $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['param'] = make_local_datetime($link, + $feed_line['last_updated'], true); array_push($cat['items'], $feed); } @@ -84,7 +87,8 @@ $cat['items'] = array(); $cat['type'] = 'category'; - $feed_result = db_query($link, "SELECT id, title,last_error + $feed_result = db_query($link, "SELECT id, title,last_error, + ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated FROM ttrss_feeds WHERE cat_id IS NULL AND owner_uid = ".$_SESSION["uid"]. " ORDER BY order_id, title"); @@ -97,13 +101,16 @@ $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['param'] = make_local_datetime($link, + $feed_line['last_updated'], true); array_push($cat['items'], $feed); } array_push($root['items'], $cat); } else { - $feed_result = db_query($link, "SELECT id, title, last_error + $feed_result = db_query($link, "SELECT id, title, last_error, + ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated FROM ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]. " ORDER BY order_id, title"); @@ -116,6 +123,8 @@ $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['param'] = make_local_datetime($link, + $feed_line['last_updated'], true); array_push($root['items'], $feed); } |