]> git.wh0rd.org Git - tt-rss.git/commitdiff
try to validate feed-specific icon before adding it to the database
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 13:21:53 +0000 (16:21 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 13:21:53 +0000 (16:21 +0300)
functions.php

index 8f60254b3ba2b8a98d6cc3b8a8689801789ec932..2102836f8ddb9fe8d40addc75d7ec5db80615150 100644 (file)
                        }
 
                        if ($icon_url && $orig_icon_url != $icon_url) { 
-                               db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
+                               if (USE_CURL_FOR_ICONS || url_validate($icon_url)) {
+                                       db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
+                               }
                        }
 
                        if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {