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/fever.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'p/api/fever.php') diff --git a/p/api/fever.php b/p/api/fever.php index 55baa6d16..abbade768 100644 --- a/p/api/fever.php +++ b/p/api/fever.php @@ -3,6 +3,7 @@ * Fever API for FreshRSS * Version 0.1 * Author: Kevin Papst / https://github.com/kevinpapst + * Documentation: https://feedafever.com/api * * Inspired by: * TinyTinyRSS Fever API plugin @dasmurphy @@ -63,7 +64,7 @@ class FeverDAO extends Minz_ModelPdo $sql = 'SELECT id, guid, title, author, ' . ($entryDAO->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') - . ', link, date, is_read, is_favorite, id_feed, tags ' + . ', link, date, is_read, is_favorite, id_feed ' . 'FROM `' . $this->prefix . 'entry` WHERE'; if (!empty($entry_ids)) { @@ -495,17 +496,17 @@ class FeverAPI // Load list of extensions and enable the "system" ones. Minz_ExtensionManager::init(); - foreach($entries as $item) { + foreach ($entries as $item) { /** @var FreshRSS_Entry $entry */ $entry = Minz_ExtensionManager::callHook('entry_before_display', $item); - if (is_null($entry)) { + if ($entry == null) { continue; } $items[] = array( 'id' => $entry->id(), 'feed_id' => $entry->feed(false), 'title' => $entry->title(), - 'author' => $entry->author(), + 'author' => $entry->authors(true), 'html' => $entry->content(), 'url' => $entry->link(), 'is_saved' => $entry->isFavorite() ? 1 : 0, -- cgit v1.2.3