From 650958f436908c573b6bdabb14445f8013bb6541 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Thu, 4 Feb 2021 11:42:06 -0800 Subject: [PATCH] pkp/oaiJats#15 Fix JATS candidate file loading --- OAIMetadataFormat_JATS.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OAIMetadataFormat_JATS.inc.php b/OAIMetadataFormat_JATS.inc.php index 89fb434..b1e22b5 100644 --- a/OAIMetadataFormat_JATS.inc.php +++ b/OAIMetadataFormat_JATS.inc.php @@ -61,8 +61,10 @@ protected function _findJats($record) { // Fetch the XML document if (!$doc) { $candidateFile = array_shift($candidateFiles); + $fileService = Services::get('file'); + $filepath = $fileService->get($candidateFile->getData('fileId'))->path; $doc = new DOMDocument; - $doc->loadXML(file_get_contents($candidateFile->getFilePath())); + $doc->loadXML($fileService->fs->read($filepath)); } return $doc;