]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix various cat-related bugs
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 1 Aug 2006 13:18:05 +0000 (14:18 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 1 Aug 2006 13:18:05 +0000 (14:18 +0100)
backend.php
feedlist.js
functions.js
functions.php
tt-rss.js

index 93798a3aadb62b2cc4b8e916d7c7681350e543ad..101ff3ee41c82f06491c4eddad3a36ed5ada8649 100644 (file)
                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];
index 14882a56868c7d7282e246c2925cb8da816edaae..b3c2b833a6efe2bde09fb332c920bd895e88ec08 100644 (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);
                        }
index ed8340444ead65ab4b976eb3a9ffec0c81bf7b51..cef4692c649fef46630ec8fe4fb85d96f72b242b 100644 (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);
index af9cd222fff6512c85ecc70fbb8100a117466e94..2e65f7a3508f5447d667c86226021416ab9375ef 100644 (file)
        }
 
        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"]);
index ec356e0ba3206eac46ec563b24b5786b3c8bcba7..8e988ff2691d0117660188771c277232132f617b 100644 (file)
--- 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;
                        }