From 5c365f6055ffe61ddcc5f2e306499945e34ddf09 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 1 Aug 2006 14:18:05 +0100 Subject: [PATCH] fix various cat-related bugs --- backend.php | 2 +- feedlist.js | 2 +- functions.js | 1 + functions.php | 7 +++---- tt-rss.js | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend.php b/backend.php index 93798a3a..101ff3ee 100644 --- a/backend.php +++ b/backend.php @@ -789,7 +789,7 @@ 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]; diff --git a/feedlist.js b/feedlist.js index 14882a56..b3c2b833 100644 --- a/feedlist.js +++ b/feedlist.js @@ -75,7 +75,7 @@ function viewfeed(feed, subop, is_cat, subop_param) { 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); } diff --git a/functions.js b/functions.js index ed834044..cef4692c 100644 --- a/functions.js +++ b/functions.js @@ -469,6 +469,7 @@ function activeFeedIsCat() { function setActiveFeedId(id) { // return setCookie("ttrss_vf_actfeed", id); try { + debug("sAFID(" + id + ")"); getMainContext().active_feed_id = id; } catch (e) { exception_error("setActiveFeedId", e); diff --git a/functions.php b/functions.php index af9cd222..2e65f7a3 100644 --- a/functions.php +++ b/functions.php @@ -2001,7 +2001,6 @@ } 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); @@ -2078,7 +2077,7 @@ } else if ($feed >= 0) { if ($cat_view) { - + if ($feed > 0) { $query_strategy_part = "cat_id = '$feed'"; } else { @@ -2086,7 +2085,7 @@ } $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; - + } else { $tmp_result = db_query($link, "SELECT id FROM ttrss_feeds WHERE parent_feed = '$feed' @@ -2144,7 +2143,7 @@ } 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"]); diff --git a/tt-rss.js b/tt-rss.js index ec356e0b..8e988ff2 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -207,7 +207,7 @@ function updateFeedList(silent, fetch) { query_str = query_str + "&tags=1"; } - if (getActiveFeedId() != undefined) { + if (getActiveFeedId() && !activeFeedIsCat()) { query_str = query_str + "&actid=" + getActiveFeedId(); } @@ -447,7 +447,7 @@ function quickMenuGo(opid) { if (opid == "qmcRemoveFeed") { var actid = getActiveFeedId(); - if (actid == undefined) { + if (!actid || activeFeedIsCat()) { alert("Please select some feed first."); return; } -- 2.39.5