From 82adb01307e108e8a2b4eeb900552160d730d0b7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Feb 2021 14:10:46 +0300 Subject: render enclosures on the client --- classes/api.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'classes/api.php') diff --git a/classes/api.php b/classes/api.php index 6debad2f7..2531f0017 100755 --- a/classes/api.php +++ b/classes/api.php @@ -311,8 +311,6 @@ class API extends Handler { while ($line = $sth->fetch()) { - $attachments = Article::get_article_enclosures($line['id']); - $article = array( "id" => $line["id"], "guid" => $line["guid"], @@ -326,7 +324,7 @@ class API extends Handler { "author" => $line["author"], "updated" => (int) strtotime($line["updated"]), "feed_id" => $line["feed_id"], - "attachments" => $attachments, + "attachments" => Article::get_enclosures($line['id']), "score" => (int)$line["score"], "feed_title" => $line["feed_title"], "note" => $line["note"], @@ -736,7 +734,7 @@ class API extends Handler { "tags" => $tags, ); - $enclosures = Article::get_article_enclosures($line['id']); + $enclosures = Article::get_enclosures($line['id']); if ($include_attachments) $headline_row['attachments'] = $enclosures; -- cgit v1.2.3