]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: check whether feed id is valid
authorAndrew Dolgov <fox@madoka.spb.ru>
Sat, 1 Sep 2007 04:49:52 +0000 (05:49 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sat, 1 Sep 2007 04:49:52 +0000 (05:49 +0100)
functions.php

index d8faef6aad8e3263772c5b0f5bbd247d8b20811e..a9b0eeec060a6b80de63a717f612f744b520e0d1 100644 (file)
                        _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");