Skip to content

Commit

Permalink
pkp#10486 adds code that optimizes the retrieval of the Context ident…
Browse files Browse the repository at this point in the history
…ifier (it was previously excluded).
  • Loading branch information
YvesLepidus committed Jan 28, 2025
1 parent bc5e628 commit 2757b51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/services/PKPSubmissionService.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ public function getProperties($submission, $props, $args = null) {

// Retrieve the submission's context for properties that require it
if (array_intersect(['_href', 'urlAuthorWorkflow', 'urlEditorialWorkflow'], $props)) {
$submissionContext = Services::get('context')->get($submission->getData('contextId'));
$submissionContext = $request->getContext();
if (!$submissionContext || $submissionContext->getId() != $submission->getData('contextId')) {
$submissionContext = Services::get('context')->get($submission->getData('contextId'));
}
}

foreach ($props as $prop) {
Expand Down

0 comments on commit 2757b51

Please sign in to comment.