diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-04-22 00:41:47 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-04-22 00:45:03 +0200 |
commit | 301aa24600ccb218bec941b7668c3fc86fa1cf4b (patch) | |
tree | 9f563614e7e17efbc8c9dbd4a7e030d86393fbad /utility | |
parent | 1140199677f93a3958a0a19271d0f853d9330c30 (diff) |
Use the email field of the author if the name field is not set
Diffstat (limited to 'utility')
-rw-r--r-- | utility/feedfetcher.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php index c54dabf05..ab1b92a4d 100644 --- a/utility/feedfetcher.php +++ b/utility/feedfetcher.php @@ -120,7 +120,11 @@ class FeedFetcher implements IFeedFetcher { $author = $simplePieItem->get_author(); if ($author !== null) { - $item->setAuthor(html_entity_decode($author->get_name())); + if ($author->get_name()) { + $item->setAuthor(html_entity_decode($author->get_name())); + } else { + $item->setAuthor(html_entity_decode($author->get_email())); + } } // TODO: make it work for video files also @@ -167,4 +171,4 @@ class FeedFetcher implements IFeedFetcher { return $feed; } -}
\ No newline at end of file +} |