From: Andrew Dolgov Date: Fri, 18 Mar 2011 14:22:20 +0000 (+0300) Subject: backend/viewfeed: fix feed checking for validity X-Git-Tag: 1.5.2~11 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=81f6deea473257379ef43ceb07077527b9d91dbb;p=tt-rss.git backend/viewfeed: fix feed checking for validity --- diff --git a/backend.php b/backend.php index 6fad38d2..5839c0d2 100644 --- a/backend.php +++ b/backend.php @@ -274,13 +274,13 @@ $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']); }