mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue in PagePathFinder where LanguageSupportPageNames module in use without using homepage language segments, combined with multi-language PagePathHistory module, could result in default language incorrectly detected from URL.
This commit is contained in:
@@ -789,7 +789,7 @@ class PagesPathFinder extends Wire {
|
|||||||
|
|
||||||
// if there were any non-default language segments, let that dictate the language
|
// if there were any non-default language segments, let that dictate the language
|
||||||
if(empty($result['language']['segment'])) {
|
if(empty($result['language']['segment'])) {
|
||||||
$useLangName = 'default';
|
$useLangName = count($result['parts']) ? 'default' : $result['language']['name'];
|
||||||
foreach($result['parts'] as $part) {
|
foreach($result['parts'] as $part) {
|
||||||
$langName = $part['language'];
|
$langName = $part['language'];
|
||||||
if(empty($langName) || $langName === 'default') continue;
|
if(empty($langName) || $langName === 'default') continue;
|
||||||
|
Reference in New Issue
Block a user