Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#9913 replaced depreciated Services::get with app()->get #45

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
use Symfony\Component\HtmlSanitizer\HtmlSanitizer;
Expand Down Expand Up @@ -75,7 +74,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 @@ -476,7 +475,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