]> git.wh0rd.org Git - tt-rss.git/commitdiff
catchup for tags
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 23 Nov 2005 16:58:26 +0000 (17:58 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 23 Nov 2005 16:58:26 +0000 (17:58 +0100)
NEWS
backend.php
feedlist.js

diff --git a/NEWS b/NEWS
index 2922fb8a173c1aea033657a2247e14431c117842..8894e4780849ce4da256df5cf3fdde2fee51f842 100644 (file)
--- 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)
 
index af49cf2a12cb411123980201a31bcc8bbfea65cc..df4abeff582068c9649d0ceaca21b61240623c8d 100644 (file)
                                        }
                                }
                        } 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");
                        }
 
                }
index 93b598146a93f535a2ac0fa17494852bc3a2c473..1331256351c600149b623cf079b8f229d6706751 100644 (file)
@@ -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("");