mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Issue #1072 - Give subdomain priority over main domain when detecting language.
This commit is contained in:
@@ -463,12 +463,7 @@ class language{
|
|||||||
if(false !== $this->detect && !$force) return $this->detect;
|
if(false !== $this->detect && !$force) return $this->detect;
|
||||||
$this->_cookie_domain = '';
|
$this->_cookie_domain = '';
|
||||||
|
|
||||||
if(!empty($pref['multilanguage_domain']) && ($newLang = $this->isLangDomain(e_DOMAIN)))
|
if(vartrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== false))
|
||||||
{
|
|
||||||
$detect_language = $this->isValid($newLang);
|
|
||||||
$this->_cookie_domain = ".".e_DOMAIN;
|
|
||||||
}
|
|
||||||
elseif(vartrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== false))
|
|
||||||
{
|
{
|
||||||
$detect_language = (e_SUBDOMAIN) ? $this->isValid(e_SUBDOMAIN) : $pref['sitelanguage'];
|
$detect_language = (e_SUBDOMAIN) ? $this->isValid(e_SUBDOMAIN) : $pref['sitelanguage'];
|
||||||
// Done in session handler now, based on MULTILANG_SUBDOMAIN value
|
// Done in session handler now, based on MULTILANG_SUBDOMAIN value
|
||||||
@@ -476,6 +471,11 @@ class language{
|
|||||||
$this->_cookie_domain = ".".e_DOMAIN;
|
$this->_cookie_domain = ".".e_DOMAIN;
|
||||||
define('MULTILANG_SUBDOMAIN',true);
|
define('MULTILANG_SUBDOMAIN',true);
|
||||||
}
|
}
|
||||||
|
elseif(!empty($pref['multilanguage_domain']) && ($newLang = $this->isLangDomain(e_DOMAIN)))
|
||||||
|
{
|
||||||
|
$detect_language = $this->isValid($newLang);
|
||||||
|
$this->_cookie_domain = ".".e_DOMAIN;
|
||||||
|
}
|
||||||
elseif(e_MENU && ($detect_language = $this->isValid(e_MENU))) //
|
elseif(e_MENU && ($detect_language = $this->isValid(e_MENU))) //
|
||||||
{
|
{
|
||||||
define("e_LANCODE",true);
|
define("e_LANCODE",true);
|
||||||
|
Reference in New Issue
Block a user