]> git.wh0rd.org Git - tt-rss.git/commitdiff
implement catchup for labels
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 25 Oct 2005 11:03:21 +0000 (12:03 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 25 Oct 2005 11:03:21 +0000 (12:03 +0100)
backend.php

index c468ad0c4c259155aa320c7538ba059ca44a7da7..378b645f82ae4419435dae9575c0ca1e11f0e400 100644 (file)
                        
                                } else if ($feed < -10) { // label
 
-                                       // FIXME, implement catchup for labels
+                                       $label_id = -$feed - 11;
 
+                                       $tmp_result = db_query($link, "SELECT sql_exp FROM ttrss_labels
+                                               WHERE id = '$label_id'");
+
+                                       if ($tmp_result) {
+                                               $sql_exp = db_fetch_result($tmp_result, 0, "sql_exp");
+
+                                               db_query($link, "UPDATE ttrss_entries 
+                                                       SET unread = false,last_read = NOW()
+                                                       WHERE $sql_exp");
+                                       }
                                }
                        } else { // tag
                                // FIXME, implement catchup for tags