Skip to content

Commit

Permalink
Merge pull request #11 from bozana/10653
Browse files Browse the repository at this point in the history
fix deprecated submission functions
  • Loading branch information
bozana authored Dec 18, 2024
2 parents a7d3139 + ce28b6f commit 4b90ab1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CoinsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ function insertFooter(string $hookName, array $params) : bool
['ctx_ver', 'Z39.88-2004'],
['rft_id', $request->url(null, 'article', 'view', $article->getId())],
['rft_val_fmt', 'info:ofi/fmt:kev:mtx:journal'],
['rft.language', $article->getLocale()],
['rft.language', $article->getData('locale')],
['rft.genre', 'article'],
['rft.title', $journal->getLocalizedName()],
['rft.jtitle', $journal->getLocalizedName()],
['rft.atitle', $article->getFullTitle($article->getLocale())],
['rft.artnum', $article->getBestArticleId()],
['rft.atitle', $publication->getFullTitles()[$article->getData('locale')]],
['rft.artnum', $article->getBestId()],
['rft.stitle', $journal->getLocalizedSetting('abbreviation')],
];
if ($issue) {
if ($issue) {
$vars = array_merge($vars, [
['rft.volume', $issue->getVolume()],
['rft.issue', $issue->getNumber()],
Expand All @@ -94,12 +94,12 @@ function insertFooter(string $hookName, array $params) : bool
$authors = $publication->getData('authors');
if ($firstAuthor = $authors->first()) {
$vars = array_merge($vars, [
['rft.aulast', $firstAuthor->getFamilyName($article->getLocale())],
['rft.aufirst', $firstAuthor->getGivenName($article->getLocale())],
['rft.aulast', $firstAuthor->getFamilyName($article->getData('locale'))],
['rft.aufirst', $firstAuthor->getGivenName($article->getData('locale'))],
]);
}

$datePublished = $article->getDatePublished();
$datePublished = $publication->getData('datePublished');
if (!$datePublished && $issue) {
$datePublished = $issue->getDatePublished();
}
Expand All @@ -115,8 +115,8 @@ function insertFooter(string $hookName, array $params) : bool
if ($doi = $article->getStoredPubId('doi')) {
$vars[] = ['rft_id', 'info:doi/' . $doi];
}
if ($article->getPages()) {
$vars[] = ['rft.pages', $article->getPages()];
if ($publication->getData('pages')) {
$vars[] = ['rft.pages', $publication->getData('pages')];
}
if ($journal->getSetting('printIssn')) {
$vars[] = ['rft.issn', $journal->getSetting('printIssn')];
Expand Down

0 comments on commit 4b90ab1

Please sign in to comment.