From 7eec90cf634f66010706c1c719f1d2e0ee8eb2a3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 23 Nov 2005 17:58:26 +0100 Subject: [PATCH] catchup for tags --- NEWS | 1 + backend.php | 14 +++++++++++++- feedlist.js | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 2922fb8a..8894e478 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ v1.1 (Dec xy, 2005) * Per-feed content filters * Support for user stylesheets * Feed categories + * "Mark as read" for tags v1.0.7 (Nov 14, 2005) diff --git a/backend.php b/backend.php index af49cf2a..df4abeff 100644 --- a/backend.php +++ b/backend.php @@ -677,7 +677,19 @@ } } } else { // tag - // FIXME, implement catchup for tags + db_query($link, "BEGIN"); + + $tag_name = db_escape_string($feed); + + $result = db_query($link, "SELECT post_int_id FROM ttrss_tags + WHERE tag_name = '$tag_name' AND owner_uid = " . $_SESSION["uid"]); + + while ($line = db_fetch_assoc($result)) { + db_query($link, "UPDATE ttrss_user_entries SET + unread = false, last_read = NOW() + WHERE int_id = " . $line["post_int_id"]); + } + db_query($link, "COMMIT"); } } diff --git a/feedlist.js b/feedlist.js index 93b59814..13312563 100644 --- a/feedlist.js +++ b/feedlist.js @@ -90,12 +90,12 @@ function viewfeed(feed, skip, subop, doc) { disableContainerChildren("headlinesToolbar", false, doc); - var btnMarkAsRead = doc.getElementById("btnMarkFeedAsRead"); +/* var btnMarkAsRead = doc.getElementById("btnMarkFeedAsRead"); if (btnMarkAsRead && !isNumeric(feed)) { btnMarkAsRead.disabled = true; btnMarkAsRead.className = "disabledButton"; - } + } */ // notify(""); -- 2.39.5