Skip to content

Commit

Permalink
#15 Fix JATS candidate file loading
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Feb 4, 2021
1 parent 65f0615 commit 650958f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OAIMetadataFormat_JATS.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 650958f

Please sign in to comment.