]> git.wh0rd.org - tt-rss.git/commitdiff
do not display image attachments inline when STRIP_IMAGES is enabled
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 10:47:15 +0000 (13:47 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 10:47:15 +0000 (13:47 +0300)
functions.php

index d7ebef3fc143fdcb978e739a8000ffb0133bb5d9..057fa447ae4e94f438e14a2c2960f00bc8b0df9e 100644 (file)
 
                                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>";
+                                                       }
                                                }
                                        }
                                }
 
                                $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>";
+                                                       }
                                                }
                                        }
                                }