if (!$match_on) {
$match_on = "both";
}
-
+
$qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on);
$result = $qfh_ret[0];
var show_next_feed = parent.getInitParam("on_catchup_show_next_feed") == "1";
- if (next_unread_feed && show_next_feed) {
+ if (next_unread_feed && show_next_feed && !activeFeedIsCat()) {
query = query + "&nuf=" + param_escape(next_unread_feed);
setActiveFeedId(next_unread_feed);
}
function setActiveFeedId(id) {
// return setCookie("ttrss_vf_actfeed", id);
try {
+ debug("sAFID(" + id + ")");
getMainContext().active_feed_id = id;
} catch (e) {
exception_error("setActiveFeedId", e);
}
function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on, $override_order = false) {
-
if ($search) {
$search_query_part = getSearchSql($search, $match_on);
} else if ($feed >= 0) {
if ($cat_view) {
-
+
if ($feed > 0) {
$query_strategy_part = "cat_id = '$feed'";
} else {
}
$vfeed_query_part = "ttrss_feeds.title AS feed_title,";
-
+
} else {
$tmp_result = db_query($link, "SELECT id
FROM ttrss_feeds WHERE parent_feed = '$feed'
} else if (preg_match('/^-?[0-9][0-9]*$/', $feed) != false && $feed >= 0) {
if ($cat_view) {
-
+
if ($feed != 0) {
$result = db_query($link, "SELECT title FROM ttrss_feed_categories
WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
query_str = query_str + "&tags=1";
}
- if (getActiveFeedId() != undefined) {
+ if (getActiveFeedId() && !activeFeedIsCat()) {
query_str = query_str + "&actid=" + getActiveFeedId();
}
if (opid == "qmcRemoveFeed") {
var actid = getActiveFeedId();
- if (actid == undefined) {
+ if (!actid || activeFeedIsCat()) {
alert("Please select some feed first.");
return;
}