update_rss_feed: check whether feed id is valid

This commit is contained in:
Andrew Dolgov 2007-09-01 05:49:52 +01:00
parent 755a43eefa
commit 5370d37f7f
1 changed files with 8 additions and 1 deletions

View File

@ -432,9 +432,16 @@
_debug("update_rss_feed: start");
}
$result = db_query($link, "SELECT update_interval,auth_login,auth_pass,cache_images
$result = db_query($link, "SELECT id,update_interval,auth_login,auth_pass,cache_images
FROM ttrss_feeds WHERE id = '$feed'");
if (db_num_rows($result) == 0) {
if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
_debug("update_rss_feed: feed $feed [$feed_url] NOT FOUND");
}
return;
}
$auth_login = db_fetch_result($result, 0, "auth_login");
$auth_pass = db_fetch_result($result, 0, "auth_pass");