diff options
author | Andrew Dolgov <[email protected]> | 2010-11-04 20:49:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-04 20:49:49 +0300 |
commit | 5d128c9589f1a1844d02a8f8204aeae65d6dc463 (patch) | |
tree | 63b22706acf750c6dfda713f126aee40d960a284 | |
parent | fe1087fbb72959a2da5c71ef405e96c84c94381e (diff) |
dashboard: show last feed update time
-rw-r--r-- | functions.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/functions.php b/functions.php index c691039d8..3c27f448b 100644 --- a/functions.php +++ b/functions.php @@ -6835,16 +6835,32 @@ print "<div class='whiteBox'>".__('No feed selected.'); + print "<p class=\"small\"><span class=\"insensitive\">"; + + $result = db_query($link, "SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds + WHERE owner_uid = " . $_SESSION['uid']); + + $last_updated = db_fetch_result($result, 0, "last_updated"); + + if (get_pref($link, 'HEADLINES_SMART_DATE')) { + $last_updated = smart_date_time(strtotime($last_updated)); + } else { + $last_updated = date($short_date, strtotime($last_updated)); + } + + printf(__("Feeds last updated at %s"), $last_updated); + $result = db_query($link, "SELECT COUNT(id) AS num_errors FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); $num_errors = db_fetch_result($result, 0, "num_errors"); if ($num_errors > 0) { - - print "<p><a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">". + print "<br/>"; + print "<a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">". __('Some feeds have update errors (click for details)')."</a>"; } + print "</span></p>"; print "</div>]]>"; print "</headlines>"; |