viewfeed: check if feed exists and report error if not

This commit is contained in:
Andrew Dolgov 2006-06-15 03:55:54 +01:00
parent a1b48fd72a
commit e33a1fdac2
1 changed files with 9 additions and 0 deletions

View File

@ -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