update_rss_feed: respect size limit of feeds.icon_url

This commit is contained in:
Andrew Dolgov 2010-11-13 20:46:32 +03:00
parent b5ec13fa89
commit 0526ffdd4c
1 changed files with 2 additions and 0 deletions

View File

@ -738,6 +738,8 @@
$icon_url = db_escape_string($rss->get_image_url()); $icon_url = db_escape_string($rss->get_image_url());
} }
$icon_url = substr($icon_url, 0, 250);
if ($icon_url && $orig_icon_url != $icon_url) { if ($icon_url && $orig_icon_url != $icon_url) {
if (USE_CURL_FOR_ICONS || url_validate($icon_url)) { if (USE_CURL_FOR_ICONS || url_validate($icon_url)) {
db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'"); db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");