summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-10 23:28:19 +0300
committerAndrew Dolgov <[email protected]>2010-11-10 23:28:19 +0300
commit9d3c031ddf1d4436f7c1d30163da3fdc4388b831 (patch)
tree71ee1fa3a94f615d45e377cba176dc671e3da046
parent8cc3c778ade9b9f4f4f382978d6cb3e6feb79fec (diff)
add test implementation of automatic rewrite of relative urls based on DOMDocument (CDM)
-rw-r--r--functions.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 751acd960..ee737c21f 100644
--- a/functions.php
+++ b/functions.php
@@ -5421,6 +5421,19 @@
}
}
+ // 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);