fix adaptive behaviour for linked feeds

This commit is contained in:
Andrew Dolgov 2006-07-25 06:02:42 +01:00
parent f295c36870
commit 831ff047dd
1 changed files with 15 additions and 2 deletions

View File

@ -1430,11 +1430,24 @@
$n_feed = sprintf("%d", $feed);
if ($is_cat) {
return getCategoryUnread($link, $feed);
return getCategoryUnread($link, $n_feed);
} else if ($n_feed == -1) {
$match_part = "marked = true";
} else if ($feed > 0) {
$result = db_query($link, "SELECT id FROM ttrss_feeds WHERE parent_feed = '$n_feed'");
if (db_num_rows($result) > 0) {
$linked_feeds = array();
while ($line = db_fetch_assoc($result)) {
array_push($linked_feeds, "feed_id = " . $line["id"]);
}
$match_part = implode(" OR ", $linked_feeds);
} else {
$match_part = "feed_id = '$n_feed'";
}
} else if ($feed < -10) {
$label_id = -$feed - 11;