summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-09-01 05:49:52 +0100
committerAndrew Dolgov <[email protected]>2007-09-01 05:49:52 +0100
commit5370d37f7fecb245104af615864c98371d92261d (patch)
tree142769832c876bc99af45100f8821ea9509112b0 /functions.php
parent755a43eefaea639d27cdf30dd3cf765f2a74a15c (diff)
update_rss_feed: check whether feed id is valid
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index d8faef6aa..a9b0eeec0 100644
--- a/functions.php
+++ b/functions.php
@@ -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");