From: Andrew Dolgov Date: Thu, 20 Nov 2008 07:27:45 +0000 (+0100) Subject: image attachment display: make possible duplicate detection actually do something X-Git-Tag: 1.2.29~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c54526fe2d8dc9fcd70712e7d2e81f071c600bb8;p=tt-rss.git image attachment display: make possible duplicate detection actually do something --- diff --git a/functions.php b/functions.php index 48d6e3a8..5dc85264 100644 --- a/functions.php +++ b/functions.php @@ -4754,13 +4754,14 @@ #print "
".__('Tags:')." $f_tags_str
"; - $line["content"] = sanitize_rss($link, $line["content"]); + $article_content = sanitize_rss($link, $line["content"]); if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) { - $line["content"] = preg_replace("/href=/i", "target=\"_blank\" href=", $line["content"]); + $article_content = preg_replace("/href=/i", "target=\"_blank\" href=", + $article_content); } - print $line["content"]; + print $article_content; $result = db_query($link, "SELECT * FROM ttrss_enclosures WHERE post_id = '$id' AND content_url != ''"); @@ -4802,14 +4803,9 @@ array_push($entries, $entry); } - if (!preg_match("/img/i", $line["content"]) && - preg_match("/image/", $entries[0]["type"])) { - - } - print "
"; - if (!preg_match("/img/i", $line["content"])) { + if (!preg_match("/img/i", $article_content)) { foreach ($entries as $entry) { if (preg_match("/image/", $entry["type"])) { print "

"; print sanitize_rss($link, $line["content_preview"]); + $article_content = $line["content_preview"]; $e_result = db_query($link, "SELECT * FROM ttrss_enclosures WHERE post_id = '$id' AND content_url != ''"); @@ -5333,7 +5330,7 @@ array_push($entries, $entry); } - if (!preg_match("/img/i", $line["content"])) { + if (!preg_match("/img/i", $article_content)) { foreach ($entries as $entry) { if (preg_match("/image/", $entry["type"])) { print "