diff --git a/classes/publication/Publication.inc.php b/classes/publication/Publication.inc.php index c06eaa449da..da83ab583f5 100644 --- a/classes/publication/Publication.inc.php +++ b/classes/publication/Publication.inc.php @@ -40,10 +40,11 @@ public function getEditorString() { * Get the URL to a localized cover image * * @param int $contextId + * @param string $preferredLocale Return the cover image in a specified locale. * @return string */ - public function getLocalizedCoverImageUrl($contextId) { - $coverImage = $this->getLocalizedData('coverImage'); + public function getLocalizedCoverImageUrl($contextId, $preferredLocale = null) { + $coverImage = $this->getLocalizedData('coverImage', $preferredLocale); if (!$coverImage) { return Application::get()->getRequest()->getBaseUrl() . '/templates/images/book-default.png'; @@ -73,4 +74,4 @@ public function getLocalizedCoverImageThumbnailUrl($contextId) { Services::get('publication')->getThumbnailFilename($pathParts['basename']), ]); } -} \ No newline at end of file +} diff --git a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php index 668b6165d4b..7ca4c146054 100644 --- a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php +++ b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php @@ -486,7 +486,7 @@ function createProductNode($doc, $submission, $publicationFormat) { $resourceVersionNode = $doc->createElementNS($deployment->getNamespace(), 'ResourceVersion'); $supportingResourceNode->appendChild($resourceVersionNode); $resourceVersionNode->appendChild($this->_buildTextNode($doc, 'ResourceForm', '01')); // Linkable resource - $resourceVersionNode->appendChild($this->_buildTextNode($doc, 'ResourceLink', $publication->getLocalizedCoverImageUrl($context->getId()))); + $resourceVersionNode->appendChild($this->_buildTextNode($doc, 'ResourceLink', $publication->getLocalizedCoverImageUrl($context->getId(), $publication->getData('locale')))); /* --- Publishing Detail --- */