]> git.wh0rd.org Git - tt-rss.git/commitdiff
backend/viewfeed: fix feed checking for validity
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 18 Mar 2011 14:22:20 +0000 (17:22 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 18 Mar 2011 14:22:20 +0000 (17:22 +0300)
backend.php

index 6fad38d2e92c761d5bc7f3966acbc742c05fca31..5839c0d2b2a650009a7fff26d8a08c0f6c2d77f5 100644 (file)
                        $result = false;
 
                        if ($feed < -10) {
-                               $label_feed = -10-$feed;
+                               $label_feed = -11-$feed;
                                $result = db_query($link, "SELECT id FROM ttrss_labels2 WHERE
                                        id = '$label_feed' AND owner_uid = " . $_SESSION['uid']);
                        } else if (!$cat_view && $feed > 0) {
                                $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
                                        id = '$feed' AND owner_uid = " . $_SESSION['uid']);
-                       } else if ($cat_view) {
+                       } else if ($cat_view && $feed > 0) {
                                $result = db_query($link, "SELECT id FROM ttrss_feed_categories WHERE
                                        id = '$feed' AND owner_uid = " . $_SESSION['uid']);
                        }