From b323ed084620cac2222fe1c93ec05b9773eb81e6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 16 Sep 2018 10:46:27 +0200 Subject: Improve authors (#2025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Links for authors and multiple authors Favour ';' as a separator instead of ',' to better cope with multi-author scientific articles. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 , https://github.com/FreshRSS/FreshRSS/issues/1968, https://github.com/FreshRSS/FreshRSS/pull/2023 * Change i18n authors * Update layout * Unicode-compatible search Example for `author:Loïc` * author styling * Final details * Minor spacing --- p/api/greader.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'p/api/greader.php') diff --git a/p/api/greader.php b/p/api/greader.php index 4affc2826..f5b84f7a1 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -18,6 +18,7 @@ Server-side API compatible with Google Reader API layer 2 * https://github.com/ericmann/gReader-Library/blob/master/greader.class.php * https://github.com/devongovett/reader * https://github.com/theoldreader/api +* https://www.inoreader.com/developers/ */ require(__DIR__ . '/../../constants.php'); @@ -471,6 +472,7 @@ function entriesToArray($entries) { 'categories' => array( 'user/-/state/com.google/reading-list', 'user/-/label/' . $c_name, + //TODO: Add other tags ), 'origin' => array( 'streamId' => 'feed/' . $f_id, @@ -478,8 +480,9 @@ function entriesToArray($entries) { //'htmlUrl' => $line['f_website'], ), ); - if ($entry->author() != '') { - $item['author'] = $entry->author(); + $author = $entry->authors(true); + if ($author != '') { + $item['author'] = $author; } if ($entry->isRead()) { $item['categories'][] = 'user/-/state/com.google/read'; -- cgit v1.2.3