]> git.wh0rd.org Git - tt-rss.git/commitdiff
get feed_id from article ref_id in outputArticleXML()
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 17 May 2007 12:42:14 +0000 (13:42 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 17 May 2007 12:42:14 +0000 (13:42 +0100)
functions.php

index b12689fb7c1ba69098c76c902f275f596d92b4c3..3cfcef875b667b34e82d2310a552f4bc9698fb25 100644 (file)
 
        function outputArticleXML($link, $id, $feed_id, $mark_as_read = true) {
 
+               /* we can figure out feed_id from article id anyway, why do we
+                * pass feed_id here? */
+
+               $result = db_query($link, "SELECT feed_id FROM ttrss_user_entries
+                       WHERE ref_id = '$id'");
+
+               $feed_id = db_fetch_result($result, 0, "feed_id");
+
                print "<article id='$id'><![CDATA[";
 
                $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
                }
 
                if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) {
-       
+
                        $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
                                WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);