]> git.wh0rd.org Git - tt-rss.git/commitdiff
add catchup fixme for all_labels feed
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 28 Jan 2009 10:08:01 +0000 (11:08 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 28 Jan 2009 10:08:01 +0000 (11:08 +0100)
functions.php

index a79b2345ab73d9450c6c7e5aac112fe9e492d8c3..ec3d7926ac4684709b60de06428a6836e7e26e8a 100644 (file)
                        
                                if ($cat_view) {
 
-                                       if ($feed > 0) {
-                                               $cat_qpart = "cat_id = '$feed'";
-                                       } else {
-                                               $cat_qpart = "cat_id IS NULL";
-                                       }
+                                       if $feed >= 0) {
+
+                                               if ($feed > 0) {
+                                                       $cat_qpart = "cat_id = '$feed'";
+                                               } else {
+                                                       $cat_qpart = "cat_id IS NULL";
+                                               }
                                        
-                                       $tmp_result = db_query($link, "SELECT id 
-                                               FROM ttrss_feeds WHERE $cat_qpart AND owner_uid = " . 
-                                               $_SESSION["uid"]);
+                                               $tmp_result = db_query($link, "SELECT id 
+                                                       FROM ttrss_feeds WHERE $cat_qpart AND owner_uid = " . 
+                                                       $_SESSION["uid"]);
 
-                                       while ($tmp_line = db_fetch_assoc($tmp_result)) {
+                                               while ($tmp_line = db_fetch_assoc($tmp_result)) {
 
-                                               $tmp_feed = $tmp_line["id"];
+                                                       $tmp_feed = $tmp_line["id"];
 
-                                               db_query($link, "UPDATE ttrss_user_entries 
-                                                       SET unread = false,last_read = NOW() 
-                                                       WHERE feed_id = '$tmp_feed' AND owner_uid = " . $_SESSION["uid"]);
+                                                       db_query($link, "UPDATE ttrss_user_entries 
+                                                               SET unread = false,last_read = NOW() 
+                                                               WHERE feed_id = '$tmp_feed' AND owner_uid = " . $_SESSION["uid"]);
+                                               }
+                                       } else if ($feed == -2) {
+
+                                               /* FIXME catchup for all labels vfeed */
                                        }
 
                                } else if ($feed > 0) {