-
-
Save incrize/824a867ac1e4b9e7707fc415fd3fc5a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/addons/seo/func.php b/app/addons/seo/func.php | |
index c1387ea9b5..b01e26d0af 100644 | |
--- a/app/addons/seo/func.php | |
+++ b/app/addons/seo/func.php | |
@@ -1466,6 +1466,7 @@ function fn_seo_url_post(&$url, &$area, &$original_url, &$prefix, &$company_id_i | |
// for non-rewritten links | |
$link_parts['path'] .= $index_script; | |
$link_parts['lang_code'] = ''; | |
+ | |
if (!empty($unset_lang_code)) { | |
$parsed_query['sl'] = $unset_lang_code; | |
} | |
@@ -3005,16 +3006,18 @@ function fn_seo_dispatch_before_display() | |
*/ | |
function fn_seo_init_language_post($params, $area, $default_language, $session_display_language, $avail_languages, &$display_language, &$description_language, $browser_language) | |
{ | |
- if ($area !== 'C') { | |
+ if ( | |
+ !empty($params['sl']) | |
+ || empty($params['dispatch']) | |
+ || !SiteArea::isStorefront($area) | |
+ || $params['dispatch'] !== 'index.index' | |
+ ) { | |
return; | |
} | |
$show_secondary_language_in_uri = YesNo::toBool(Registry::get('addons.seo.seo_language')); | |
- if (!$show_secondary_language_in_uri) { | |
- return; | |
- } | |
- if (!empty($params['sl'])) { | |
+ if (!$show_secondary_language_in_uri) { | |
return; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment