Skip to content

Commit

Permalink
pkp/pkp-lib#10653 remove deprecated submission functions in resolver …
Browse files Browse the repository at this point in the history
…plugin
  • Loading branch information
kaitlinnewson committed Dec 6, 2024
1 parent 8d33d24 commit 9ba8d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/gateways/resolver/ResolverPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ public function fetch($args, $request)
foreach ($submissions as $submission) {
// Look for the correct page in the list of articles.
$matches = null;
if (preg_match('/^[Pp][Pp]?[.]?[ ]?(\d+)$/u', $submission->getPages(), $matches)) {
if (preg_match('/^[Pp][Pp]?[.]?[ ]?(\d+)$/u', $submission->getCurrentPublication()->getData('pages'), $matches)) {
$matchedPage = $matches[1];
if ($page == $matchedPage) {
$request->redirect(null, 'article', 'view', $submission->getBestId());
}
}
if (preg_match('/^[Pp][Pp]?[.]?[ ]?(\d+)[ ]?-[ ]?([Pp][Pp]?[.]?[ ]?)?(\d+)$/u', $submission->getPages(), $matches)) {
if (preg_match('/^[Pp][Pp]?[.]?[ ]?(\d+)[ ]?-[ ]?([Pp][Pp]?[.]?[ ]?)?(\d+)$/u', $submission->getCurrentPublication()->getData('pages'), $matches)) {
$matchedPageFrom = $matches[1];
$matchedPageTo = $matches[3];
if ($page >= $matchedPageFrom && ($page < $matchedPageTo || ($page == $matchedPageTo && $matchedPageFrom = $matchedPageTo))) {
Expand Down

0 comments on commit 9ba8d0e

Please sign in to comment.