summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-12-04 01:30:54 +0400
committerAndrew Dolgov <[email protected]>2013-12-04 01:30:54 +0400
commit429ff9afb03b079b76c4a9080994ce05dd104515 (patch)
tree399020386d84d40d5133adf1351e56f481c3a233 /classes/api.php
parentbf5bcb8e272feb19103d601d29f17cb9917e95c3 (diff)
api: add article language to getArticle/getHeadlines
Diffstat (limited to 'classes/api.php')
-rw-r--r--classes/api.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/api.php b/classes/api.php
index 8e279521a..0306eff94 100644
--- a/classes/api.php
+++ b/classes/api.php
@@ -313,7 +313,7 @@ class API extends Handler {
if ($article_id) {
$query = "SELECT id,title,link,content,feed_id,comments,int_id,
- marked,unread,published,score,note,
+ marked,unread,published,score,note,lang,
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title
FROM ttrss_entries,ttrss_user_entries
@@ -346,7 +346,8 @@ class API extends Handler {
"attachments" => $attachments,
"score" => (int)$line["score"],
"feed_title" => $line["feed_title"],
- "note" => $line["note"]
+ "note" => $line["note"],
+ "lang" => $line["lang"]
);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {
@@ -705,6 +706,7 @@ class API extends Handler {
$headline_row["score"] = (int)$line["score"];
$headline_row["note"] = $line["note"];
+ $headline_row["lang"] = $line["lang"];
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) {
$headline_row = $p->hook_render_article_api(array("headline" => $headline_row));