]> git.wh0rd.org Git - tt-rss.git/commitdiff
add test implementation of automatic rewrite of relative urls based on DOMDocument...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 10 Nov 2010 20:28:19 +0000 (23:28 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 10 Nov 2010 20:28:19 +0000 (23:28 +0300)
functions.php

index 751acd96043de8b797c78d66bec2951053198f7b..ee737c21f9ea2235efa3d2f30c80320ca52e56a4 100644 (file)
                                                }
                                        }
 
+                                       // FIXME: make this less of a hack
+
+                                       $feed_site_url = false;
+
+                                       if ($line["feed_id"]) {
+                                               $tmp_result = db_query($link, "SELECT site_url FROM ttrss_feeds
+                                                       WHERE id = " . $line["feed_id"]);
+
+                                               if (db_num_rows($tmp_result) == 1) {
+                                                       $feed_site_url = db_fetch_result($tmp_result, 0, "site_url");
+                                               }
+                                       }
+
                                        $article_content = sanitize_rss($link, $line["content_preview"], 
                                                false, false, $feed_site_url);