summaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-09-09 13:03:51 +0200
committerGravatar GitHub <noreply@github.com> 2018-09-09 13:03:51 +0200
commit44bd07e506ade204151c276fdc05994d51efdd7a (patch)
tree2efe48133d2c874c65a99ae3a6cd92bb0dff4fe8 /app/Models/Feed.php
parent3306a1679c2570c30d4b662c887b4a71ce147398 (diff)
parent1802c1e9ae7d3d55a0e37e1cc2e7c0acc25f70ba (diff)
Merge pull request #2001 from FreshRSS/dev1.11.2
FreshRSS 1.11.2
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 89eb0a53c..ed381a867 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -59,8 +59,8 @@ class FreshRSS_Feed extends Minz_Model {
return $this->hash;
}
- public function url() {
- return $this->url;
+ public function url($includeCredentials = true) {
+ return $includeCredentials ? $this->url : SimplePie_Misc::url_remove_credentials($this->url);
}
public function selfUrl() {
return $this->selfUrl;
@@ -341,7 +341,7 @@ class FreshRSS_Feed extends Minz_Model {
foreach ($feed->get_items() as $item) {
$title = html_only_entity_decode(strip_tags($item->get_title()));
- $author = $item->get_author();
+ $authors = $item->get_authors();
$link = $item->get_permalink();
$date = @strtotime($item->get_date());
@@ -409,12 +409,19 @@ class FreshRSS_Feed extends Minz_Model {
$guid = $item->get_id(false, false);
$hasUniqueGuids &= empty($guids['_' . $guid]);
$guids['_' . $guid] = true;
+ $author_names = '';
+ if (is_array($authors)) {
+ foreach ($authors as $author) {
+ $author_names .= html_only_entity_decode(strip_tags($author->name == '' ? $author->email : $author->name)) . ', ';
+ }
+ }
+ $author_names = substr($author_names, 0, -2);
$entry = new FreshRSS_Entry(
$this->id(),
$guid,
$title === null ? '' : $title,
- $author === null ? '' : html_only_entity_decode(strip_tags($author->name == null ? $author->email : $author->name)),
+ $author_names,
$content === null ? '' : $content,
$link === null ? '' : $link,
$date ? $date : time()