]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: add attachment information in getArticle
authorAndrew Dolgov <fox@bah.org.ru>
Sun, 18 Jul 2010 13:15:32 +0000 (17:15 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Sun, 18 Jul 2010 13:15:32 +0000 (17:15 +0400)
api/index.php

index 8e6400a008b0f3cc5ae020fb7e84c081be1c761a..1faf9a9fd8cfbffaaa26e0e8db5ccfade4926252 100644 (file)
                                WHERE   id = '$article_id' AND ref_id = id AND owner_uid = " . 
                                        $_SESSION["uid"] ;
 
+                       $attachments = get_article_enclosures($link, $article_id);
+
                        $result = db_query($link, $query);
 
                        $article = array();
                                        "author" => $line["author"],
                                        "updated" => strtotime($line["updated"]),
                                        "content" => $line["content"],
-                                       "feed_id" => $line["feed_id"],                  
+                                       "feed_id" => $line["feed_id"],
+                                       "attachments" => $attachments
                                );
                        }