From e33a1fdac280c4e192aac3719f1558da32255fab Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 15 Jun 2006 03:55:54 +0100 Subject: [PATCH] viewfeed: check if feed exists and report error if not --- backend.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend.php b/backend.php index 7421f781d..b77575723 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