]> git.wh0rd.org - tt-rss.git/commitdiff
viewfeed_offline: remove duplicate headlines
authorAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Feb 2009 17:20:18 +0000 (20:20 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Fri, 6 Feb 2009 17:20:18 +0000 (20:20 +0300)
offline.js

index a02c978ba12fa73942df5dc0a6bce5f23eb66609..c3fc1bb082c241a78ef68d393505b4b7f2a69b00 100644 (file)
@@ -195,6 +195,8 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
                                mode_qpart = "1";
                        }
 
+                       var ext_tables_qpart = "";
+
                        if (feed_id > 0) {
                                strategy_qpart = "feed_id = " + feed_id;
                        } else if (feed_id == -1) {
@@ -203,8 +205,8 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
                                strategy_qpart = "1";
                        } else if (feed_id < -10) {
                                var label_id = -11 - feed_id;
-                               strategy_qpart = "label_id = " + label_id;
-
+                               strategy_qpart = "article_labels.id = articles.id AND label_id = " + label_id;
+                               ext_tables_qpart = ",article_labels";
                        }
 
                        if (offset > 0) {
@@ -214,8 +216,8 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
                        }
 
                        var query = "SELECT *,feeds.title AS feed_title "+
-                               "FROM articles,feeds LEFT JOIN article_labels "+
-                                       "ON (article_labels.id = articles.id) WHERE " +
+                               "FROM articles,feeds"+ext_tables_qpart+" "+
+                               "WHERE " +
                                "feed_id = feeds.id AND " +
                                strategy_qpart +
                                " AND " + mode_qpart +