viewfeed_offline: remove duplicate headlines

master
Andrew Dolgov 16 years ago
parent 41cb233a11
commit 79645416fe

@ -195,6 +195,8 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
mode_qpart = "1"; mode_qpart = "1";
} }
var ext_tables_qpart = "";
if (feed_id > 0) { if (feed_id > 0) {
strategy_qpart = "feed_id = " + feed_id; strategy_qpart = "feed_id = " + feed_id;
} else if (feed_id == -1) { } 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"; strategy_qpart = "1";
} else if (feed_id < -10) { } else if (feed_id < -10) {
var label_id = -11 - feed_id; 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) { 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 "+ var query = "SELECT *,feeds.title AS feed_title "+
"FROM articles,feeds LEFT JOIN article_labels "+ "FROM articles,feeds"+ext_tables_qpart+" "+
"ON (article_labels.id = articles.id) WHERE " + "WHERE " +
"feed_id = feeds.id AND " + "feed_id = feeds.id AND " +
strategy_qpart + strategy_qpart +
" AND " + mode_qpart + " AND " + mode_qpart +

Loading…
Cancel
Save