do not display image attachments inline when STRIP_IMAGES is enabled

This commit is contained in:
Andrew Dolgov 2010-01-11 13:47:15 +03:00
parent 3b0a65adea
commit fbaca24658
1 changed files with 16 additions and 12 deletions

View File

@ -4814,12 +4814,14 @@
print "<div class=\"postEnclosures\">";
if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) {
foreach ($entries as $entry) {
if (preg_match("/image/", $entry["type"])) {
print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
if (!get_pref($link, "STRIP_IMAGES")) {
if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) {
foreach ($entries as $entry) {
if (preg_match("/image/", $entry["type"])) {
print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
}
}
}
}
@ -5392,12 +5394,14 @@
$always_display_enclosures = db_fetch_result($tmp_result, 0, "always_display_enclosures");
if ($always_display_enclosures || !preg_match("/img/i", $article_content)) {
foreach ($entries as $entry) {
if (preg_match("/image/", $entry["type"])) {
print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
if (!get_pref($link, "STRIP_IMAGES")) {
if ($always_display_enclosures || !preg_match("/img/i", $article_content)) {
foreach ($entries as $entry) {
if (preg_match("/image/", $entry["type"])) {
print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
}
}
}
}