|
3 | 3 | /**
|
4 | 4 | * @file plugins/generic/googleScholar/GoogleScholarPlugin.php
|
5 | 5 | *
|
6 |
| - * Copyright (c) 2014-2020 Simon Fraser University |
7 |
| - * Copyright (c) 2003-2020 John Willinsky |
| 6 | + * Copyright (c) 2014-2025 Simon Fraser University |
| 7 | + * Copyright (c) 2003-2025 John Willinsky |
8 | 8 | * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
9 | 9 | *
|
10 | 10 | * @class GoogleScholarPlugin
|
|
24 | 24 | use PKP\citation\CitationDAO;
|
25 | 25 | use PKP\core\PKPApplication;
|
26 | 26 | use PKP\db\DAORegistry;
|
27 |
| -use PKP\i18n\LocaleConversion; |
28 | 27 | use PKP\plugins\GenericPlugin;
|
29 | 28 | use PKP\plugins\Hook;
|
30 | 29 |
|
@@ -116,8 +115,11 @@ public function submissionView($hookName, $args)
|
116 | 115 | $authors = $publication->getData('authors');
|
117 | 116 | foreach ($authors as $i => $author) {
|
118 | 117 | $templateMgr->addHeader('googleScholarAuthor' . $i, '<meta name="citation_author" content="' . htmlspecialchars($author->getFullName(false, false, $publicationLocale)) . '"/>');
|
119 |
| - if ($affiliation = $author->getLocalizedData('affiliation', $publicationLocale)) { |
120 |
| - $templateMgr->addHeader('googleScholarAuthor' . $i . 'Affiliation', '<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation) . '"/>'); |
| 118 | + foreach($author->getAffiliations() as $affiliation) { |
| 119 | + $templateMgr->addHeader( |
| 120 | + 'googleScholarAuthor' . $i . 'Affiliation' . $affiliation->getId(), |
| 121 | + '<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation->getLocalizedName($publicationLocale)) . '"/>' |
| 122 | + ); |
121 | 123 | }
|
122 | 124 | }
|
123 | 125 |
|
|
0 commit comments