]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: add feed_title to getArticle
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 27 Apr 2013 08:25:40 +0000 (12:25 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 27 Apr 2013 08:25:40 +0000 (12:25 +0400)
classes/api.php

index c2b7f2a8ebddd13f19bcf79c094e13f46c21199e..2e243d0254d86a3ee231d41bb5e32978897d7865 100644 (file)
@@ -309,7 +309,7 @@ class API extends Handler {
                $query = "SELECT id,title,link,content,cached_content,feed_id,comments,int_id,
                        marked,unread,published,score,
                        ".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
-                       author
+                       author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title
                        FROM ttrss_entries,ttrss_user_entries
                        WHERE   id IN ($article_id) AND ref_id = id AND owner_uid = " .
                                $_SESSION["uid"] ;
@@ -338,7 +338,8 @@ class API extends Handler {
                                        "content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"],
                                        "feed_id" => $line["feed_id"],
                                        "attachments" => $attachments,
-                                       "score" => (int)$line["score"]
+                                       "score" => (int)$line["score"],
+                                       "feed_title" => $line["feed_title"]
                                );
 
                                foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {