]> git.wh0rd.org Git - tt-rss.git/commitdiff
viewfeed: check if feed exists and report error if not
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 15 Jun 2006 02:55:54 +0000 (03:55 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 15 Jun 2006 02:55:54 +0000 (03:55 +0100)
backend.php

index 7421f781d80d76832688064bcce6ffc78178e9ca..b77575723ab7d923fc0eea98e0f695132e55cfb9 100644 (file)
                        }
                }
 
+               $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