Skip to content

Commit

Permalink
pkp#10818 Updated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 18, 2025
1 parent 778d1bc commit 005f9dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/core/PKPPageRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,9 @@ private function _getLocaleForUrl(PKPRequest $request, ?Context $context, array
*/
private function _setLocale(PKPRequest $request, ?string $setLocale): void
{
$contextPath = $this->_getRequestedUrlParts(['Core', 'getContextPath'], $request);
$urlLocale = $this->_getRequestedUrlParts(['Core', 'getLocalization'], $request);
$contextPath = $this->_getRequestedUrlParts(Core::getContextPath(...), $request);
$urlLocale = $this->_getRequestedUrlParts(Core::getLocalization(...), $request);
$multiLingual = count($this->_getContextAndLocales($request, $contextPath)[1]) > 1;

if (!$setLocale && ($multiLingual ? $urlLocale === Locale::getLocale() : !$urlLocale)) {
return;
}
Expand Down

0 comments on commit 005f9dd

Please sign in to comment.