]> git.wh0rd.org Git - tt-rss.git/commitdiff
offline: do not sync hidden feeds
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 12:12:03 +0000 (15:12 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 12:12:03 +0000 (15:12 +0300)
modules/backend-rpc.php

index ff723646c47123c502e59f1f01277da367013d89..6bae380a1d9492f9f0d3064f8600da2f8341a299 100644 (file)
                                print "<feeds>";
 
                                $result = db_query($link, "SELECT id, title, cat_id FROM
-                                       ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]);
+                                       ttrss_feeds WHERE hidden = false AND owner_uid = ".$_SESSION["uid"]);
 
                                while ($line = db_fetch_assoc($result)) {
 
                                        }                       
 
                                        $result = db_query($link,
-                                               "SELECT DISTINCT id,title,guid,link,comments,
-                                                               feed_id,content,updated,unread,marked FROM
-                                                       ttrss_user_entries,ttrss_entries
-                                                       WHERE $unread_qpart $cid_qpart $date_qpart
-                                                       ref_id = id AND owner_uid = ".$_SESSION["uid"]."
+                                               "SELECT DISTINCT ttrss_entries.id,ttrss_entries.title,
+                                                       guid,link,comments,
+                                                       feed_id,content,updated,unread,marked FROM
+                                                       ttrss_user_entries,ttrss_entries,ttrss_feeds
+                                               WHERE $unread_qpart $cid_qpart $date_qpart
+                                                       hidden = false AND
+                                                       ttrss_feeds.id = feed_id AND
+                                                       ref_id = ttrss_entries.id AND 
+                                                       ttrss_user_entries.owner_uid = ".$_SESSION["uid"]."
                                                        ORDER BY updated DESC LIMIT $limit OFFSET $skip");
 
                                        if (function_exists('json_encode')) {