From: Andrew Dolgov Date: Sat, 17 May 2008 04:26:56 +0000 (+0100) Subject: vfeed grouping: allow per-feed catchup X-Git-Tag: 1.2.23-final~99 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a9bcfb8ff84cbaa87bf18607ced4763f0d92a192;p=tt-rss.git vfeed grouping: allow per-feed catchup --- diff --git a/functions.php b/functions.php index 9f3505f9..e9134328 100644 --- a/functions.php +++ b/functions.php @@ -4694,6 +4694,8 @@ if ($subop == "undefined") $subop = ""; + $subop_split = split(":", $subop); + if ($subop == "CatchupSelected") { $ids = split(",", db_escape_string($_GET["ids"])); $cmode = sprintf("%d", $_GET["cmode"]); @@ -4715,6 +4717,11 @@ } } + if ($subop_split[0] == "MarkAllReadGR") { + catchup_feed($link, $subop_split[1], false); + } + + if ($feed_id > 0) { $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE id = '$feed' LIMIT 1"); @@ -4921,16 +4928,20 @@ if (defined('_VFEED_GROUP_BY_FEED')) { if ($line["feed_title"] != $cur_feed_title) { + + $cur_feed_title = $line["feed_title"]; + /* print "". $line["feed_title"]. " (". "more)"; */ + $vf_catchup_link = "(select, + mark as read)"; + print "". "". - $line["feed_title"].":"; - - $cur_feed_title = $line["feed_title"]; + $line["feed_title"]." $vf_catchup_link:"; } } diff --git a/tt-rss.js b/tt-rss.js index 4fe94817..f6d60327 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -648,6 +648,15 @@ function catchupCurrentFeed() { } } +function catchupFeedInGroup(id, title) { + + var str = __("Mark all articles in %s as read?").replace("%s", title); + + if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) { + return viewCurrentFeed('MarkAllReadGR:' + id) + } +} + function editFeedDlg(feed) { try {