]> git.wh0rd.org - tt-rss.git/commitdiff
remove feed_site_url hack in headlines generator
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 14 Nov 2011 07:55:57 +0000 (11:55 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 14 Nov 2011 07:55:57 +0000 (11:55 +0400)
functions.php

index 90f9e8a0906f5aeb32f7e6cf64f69dda0c0fe36c..0dd9ccab3db5c84982df0881b905fc61a9466667 100644 (file)
                                                label_cache,
                                                tag_cache,
                                                always_display_enclosures,
+                                               site_url,
                                                note,
                                                num_comments,
                                                comments,
                                                                "unread," .
                                                                "feed_id," .
                                                                "orig_feed_id," .
+                                                               "site_url," .
+                                                               "always_display_enclosures, ".
                                                                "marked," .
+                                                               "num_comments, " .
+                                                               "comments, " .
                                                                "tag_cache," .
                                                                "label_cache," .
                                                                "link," .
                                                }
                                        }
 
-                                       // 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");
-                                               }
-                                       }
+                                       $feed_site_url = $line["site_url"];
 
                                        $article_content = sanitize_rss($link, $line["content_preview"],
                                                        false, false, $feed_site_url);