Skip to content

Commit

Permalink
pkp/pkp-lib#9913 replaced depreciated Services::get with app()->get
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir authored and asmecher committed Aug 1, 2024
1 parent f624e70 commit 45373b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions JatsTemplateDownloadHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use PKP\db\DAORegistry;
use PKP\config\Config;
use APP\facades\Repo;
use APP\core\Services;
use APP\handler\Handler;
use Firebase\JWT\JWT;

Expand Down Expand Up @@ -84,8 +83,8 @@ function download($args, $request) {
foreach ($layoutFiles as $layoutFile) {
if ($layoutFile->getId() != $request->getUserVar('submissionFileId') || $layoutFile->getData('fileId') != $request->getUserVar('fileId')) continue;

$filename = Services::get('file')->formatFilename($layoutFile->getData('path'), $layoutFile->getLocalizedData('name'));
Services::get('file')->download($layoutFile->getData('fileId'), $filename);
$filename = app()->get('file')->formatFilename($layoutFile->getData('path'), $layoutFile->getLocalizedData('name'));
app()->get('file')->download($layoutFile->getData('fileId'), $filename);
return;
}
$request->getDispatcher()->handle404();
Expand Down
3 changes: 1 addition & 2 deletions classes/ArticleBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace APP\plugins\generic\jatsTemplate\classes;

use APP\core\Services;
use APP\facades\Repo;
use APP\submission\Submission;
use PKP\config\Config;
Expand All @@ -39,7 +38,7 @@ public function create(Submission $submission):\DOMNode
});

// Provide the full-text.
$fileService = Services::get('file');
$fileService = app()->get('file');
foreach ($galleys as $galley) {
$galleyFile = Repo::submissionFile()->get($galley->getData('submissionFileId'));
if (!$galleyFile) continue;
Expand Down

0 comments on commit 45373b2

Please sign in to comment.