private function format_headline_subtoolbar($feed_site_url, $feed_title,
$feed_id, $is_cat, $search,
- $search_mode, $view_mode, $error) {
+ $search_mode, $view_mode, $error, $feed_last_updated) {
$page_prev_link = "viewFeedGoPage(-1)";
$page_next_link = "viewFeedGoPage(1)";
$reply .= "<span id='feed_title'>";
if ($feed_site_url) {
+ $last_updated = T_sprintf("Last updated: %s",
+ $feed_last_updated);
+
$target = "target=\"_blank\"";
- $reply .= "<a title=\"".__("Visit the website")."\" $target href=\"$feed_site_url\">".
+ $reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
truncate_string($feed_title,30)."</a>";
if ($error) {
$feed_title = $qfh_ret[1];
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
+ $last_updated = make_local_datetime($qfh_ret[4]);
$vgroup_last_feed = $vgr_last_feed;
$reply['toolbar'] = $this->format_headline_subtoolbar($feed_site_url,
$feed_title,
$feed, $cat_view, $search, $search_mode, $view_mode,
- $last_error);
+ $last_error, $last_updated);
$headlines_count = $this->dbh->num_rows($result);
$feed_title = getCategoryTitle($feed);
} else {
if (is_numeric($feed) && $feed > 0) {
- $result = db_query("SELECT title,site_url,last_error
+ $result = db_query("SELECT title,site_url,last_error,last_updated
FROM ttrss_feeds WHERE id = '$feed' AND owner_uid = $owner_uid");
$feed_title = db_fetch_result($result, 0, "title");
$feed_site_url = db_fetch_result($result, 0, "site_url");
$last_error = db_fetch_result($result, 0, "last_error");
+ $last_updated = db_fetch_result($result, 0, "last_updated");
} else {
$feed_title = getFeedTitle($feed);
}
$result = db_query($select_qpart . $from_qpart . $where_qpart);
}
- return array($result, $feed_title, $feed_site_url, $last_error);
+ return array($result, $feed_title, $feed_site_url, $last_error, $last_updated);
}