forked from wallabag/wallabag
Make updateAuthor code simpler to read
This commit is contained in:
@ -83,15 +83,17 @@ class EntriesExport
|
|||||||
*/
|
*/
|
||||||
public function updateAuthor($method)
|
public function updateAuthor($method)
|
||||||
{
|
{
|
||||||
$this->author = $method.' authors';
|
if ('entry' !== $method) {
|
||||||
|
$this->author = $method . ' authors';
|
||||||
|
|
||||||
if ('entry' === $method) {
|
return $this;
|
||||||
$publishedBy = $this->entries[0]->getPublishedBy();
|
}
|
||||||
if (!empty($publishedBy)) {
|
|
||||||
$this->author = implode(', ', $this->entries[0]->getPublishedBy());
|
$this->author = $this->entries[0]->getDomainName();
|
||||||
} else {
|
|
||||||
$this->author = $this->entries[0]->getDomainName();
|
$publishedBy = $this->entries[0]->getPublishedBy();
|
||||||
}
|
if (!empty($publishedBy)) {
|
||||||
|
$this->author = implode(', ', $publishedBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
Reference in New Issue
Block a user