diff options
author | Andrew Dolgov <[email protected]> | 2006-06-15 03:55:54 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-06-15 03:55:54 +0100 |
commit | e33a1fdac280c4e192aac3719f1558da32255fab (patch) | |
tree | 15fbfe68d4f00eb358b8d8db5d454d016a4f8a83 | |
parent | a1b48fd72a1a270cfa14b6c7b493a7ddd3b26f9d (diff) |
viewfeed: check if feed exists and report error if not
-rw-r--r-- | backend.php | 9 |
1 files changed, 9 insertions, 0 deletions
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 "<div align='center'> + Could not display feed: feed not found.</div>"; + return; + } + if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) { $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds |