Skip to content

Commit

Permalink
pkp/pkp-lib#9913 replaced depreciated Services::get with app()->get (#45
Browse files Browse the repository at this point in the history
)
  • Loading branch information
touhidurabir authored Aug 1, 2024
1 parent 21b7989 commit 6e31fc3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions OAIMetadataFormat_JATS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 6e31fc3

Please sign in to comment.