From: Andrew Dolgov Date: Thu, 15 Jun 2006 02:55:54 +0000 (+0100) Subject: viewfeed: check if feed exists and report error if not X-Git-Tag: 1.2.1~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e33a1fdac280c4e192aac3719f1558da32255fab;p=tt-rss.git viewfeed: check if feed exists and report error if not --- diff --git a/backend.php b/backend.php index 7421f781..b7757572 100644 --- a/backend.php +++ b/backend.php @@ -721,6 +721,15 @@ } } + $result = db_query($link, + "SELECT id FROM ttrss_feeds WHERE id = '$feed' LIMIT 1"); + + if (db_num_rows($result) == 0) { + print "
+ Could not display feed: feed not found.
"; + return; + } + if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) { $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds