]> git.wh0rd.org Git - tt-rss.git/commitdiff
image attachment display: make possible duplicate detection actually do something
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 20 Nov 2008 07:27:45 +0000 (08:27 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 20 Nov 2008 07:27:45 +0000 (08:27 +0100)
functions.php

index 48d6e3a858adb4926c7d372781be8567c4dfce6e..5dc85264a99ffcfaafb14c694e3428a26f531972 100644 (file)
                        
                        #print "<div id=\"allEntryTags\">".__('Tags:')." $f_tags_str</div>";
 
-                       $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 != ''");
                                        array_push($entries, $entry);
                                }
 
-                               if (!preg_match("/img/i", $line["content"]) &&
-                                       preg_match("/image/", $entries[0]["type"])) {
-
-                               }
-
                                print "<div class=\"postEnclosures\">";
 
-                               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 "<p><img 
 //                                     print "<div class=\"cdmInnerContent\" id=\"CICD-$id\" $cdm_cstyle>";
 
                                        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 != ''");
                                        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 "<p><img