From: Andrew Dolgov Date: Fri, 24 Oct 2008 04:49:22 +0000 (+0100) Subject: i can haz cheeseburger - enable for CDM X-Git-Tag: 1.2.29~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a3eeb47167559eae03cd9d155a9ff85400094e80;p=tt-rss.git i can haz cheeseburger - enable for CDM --- diff --git a/functions.php b/functions.php index 180654c0..f9c78bee 100644 --- a/functions.php +++ b/functions.php @@ -5284,14 +5284,8 @@ post_id = '$id' AND content_url != ''"); if (db_num_rows($e_result) > 0) { - print "
"; - - if (db_num_rows($e_result) == 1) { - print __("Attachment:") . " "; - } else { - print __("Attachments:") . " "; - } + $entries_html = array(); $entries = array(); while ($e_line = db_fetch_assoc($e_result)) { @@ -5314,14 +5308,41 @@ $entry .= "" . $filename . " (" . $ctype . ")" . ""; + array_push($entries_html, $entry); + + $entry = array(); + + $entry["type"] = $ctype; + $entry["filename"] = $filename; + $entry["url"] = $url; + array_push($entries, $entry); } - print join(", ", $entries); + if (!preg_match("/img/i", $line["content"])) { + foreach ($entries as $entry) { + if (preg_match("/image/", $entry["type"])) { + print "

\"".htmlspecialchars($entry["filename"])."\"

"; + } + } + } + + print "
"; + + if (db_num_rows($e_result) == 1) { + print __("Attachment:") . " "; + } else { + print __("Attachments:") . " "; + } + + print join(", ", $entries_html); print "
"; } + print "
"; // print "
";