From 6e31fc3c8ca6582b85935491b14bf2c8e0e601e6 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 1 Aug 2024 21:30:10 +0600 Subject: [PATCH] pkp/pkp-lib#9913 replaced depreciated Services::get with app()->get (#45) --- OAIMetadataFormat_JATS.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OAIMetadataFormat_JATS.php b/OAIMetadataFormat_JATS.php index d5194d1..98fc4cd 100644 --- a/OAIMetadataFormat_JATS.php +++ b/OAIMetadataFormat_JATS.php @@ -22,7 +22,6 @@ use APP\core\Application; use APP\issue\IssueAction; use PKP\plugins\PluginRegistry; -use APP\core\Services; use PKP\core\PKPString; use PKP\plugins\Hook; @@ -73,7 +72,7 @@ protected function _findJats($record) { // Fetch the XML document if (!$doc) { $candidateFile = array_shift($candidateFiles); - $fileService = Services::get('file'); + $fileService = app()->get('file'); $filepath = $fileService->get($candidateFile->getData('fileId'))->path; $doc = new DOMDocument; $doc->loadXML($fileService->fs->read($filepath)); @@ -478,7 +477,7 @@ protected function _mungeMetadata($doc, $journal, $article, $section, $issue) { * @return boolean */ protected function _isCandidateFile($submissionFile) { - $fileService = Services::get('file'); + $fileService = app()->get('file'); $filepath = $fileService->get($submissionFile->getData('fileId'))->path; $mimeType = $fileService->fs->mimeType($filepath);