fix various cat-related bugs

This commit is contained in:
Andrew Dolgov 2006-08-01 14:18:05 +01:00
parent 826cdd263a
commit 5c365f6055
5 changed files with 8 additions and 8 deletions

View file

@ -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];

View file

@ -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);
}

View file

@ -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);

View file

@ -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"]);

View file

@ -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;
}