Skip to content

Commit

Permalink
#19 Addressed empty lastName
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 16, 2022
1 parent b088a65 commit 5a98d82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion parsers/aPlusPlus/AuthorParser.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ private function _processAuthor(\Publication $publication, \DOMNode $authorNode)
$authorDao = \DAORegistry::getDAO('AuthorDAO');
$author = $authorDao->newDataObject();
$author->setData('givenName', $firstName, $this->getLocale());
$author->setData('familyName', $lastName, $this->getLocale());
if ($lastName) {
$author->setData('familyName', $lastName, $this->getLocale());
}
//$author->setData('preferredPublicName', "", $this->getLocale());
$author->setData('email', $this->selectText('Contact/Email', $authorNode) ?: $this->getConfiguration()->getEmail());
$author->setData('url', $this->selectText('Contact/URL', $authorNode));
Expand Down
4 changes: 3 additions & 1 deletion parsers/jats/AuthorParser.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ private function _processAuthor(\Publication $publication, \DOMNode $authorNode)
$authorDao = \DAORegistry::getDAO('AuthorDAO');
$author = $authorDao->newDataObject();
$author->setData('givenName', $firstName, $this->getLocale());
$author->setData('familyName', $lastName, $this->getLocale());
if ($lastName) {
$author->setData('familyName', $lastName, $this->getLocale());
}
//$author->setData('preferredPublicName', "", $this->getLocale());
$author->setData('email', $email ?: $this->getConfiguration()->getEmail());
$author->setData('affiliation', $affiliation, $this->getLocale());
Expand Down

0 comments on commit 5a98d82

Please sign in to comment.