mirror of
https://github.com/e107inc/e107.git
synced 2025-07-26 01:11:28 +02:00
Bugfix: language links were failing when multiple subdomain-language-selections were in place.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// $Id: languagelinks.sc,v 1.1.1.1 2006-12-02 04:33:39 mcfly_e107 Exp $
|
||||
// $Id: languagelinks.sc,v 1.2 2007-10-30 23:34:01 e107coders Exp $
|
||||
global $pref;
|
||||
$sep = (defined("LANGLINKS_SEPARATOR")) ? LANGLINKS_SEPARATOR : "| ";
|
||||
$cursub = explode(".",$_SERVER['HTTP_HOST']);
|
||||
@@ -28,13 +28,13 @@ $lng = new language;
|
||||
$subdom = (isset($cursub[2])) ? $cursub[0] : "";
|
||||
|
||||
if(isset($pref['multilanguage_subdomain']) && $pref['multilanguage_subdomain']){
|
||||
$link = (e_QUERY) ? str_replace($_SERVER['HTTP_HOST'],$code.$pref['multilanguage_subdomain'],e_SELF)."?".e_QUERY : str_replace($_SERVER['HTTP_HOST'],$code.$pref['multilanguage_subdomain'],e_SELF);
|
||||
$link = (e_QUERY) ? str_replace($_SERVER['HTTP_HOST'],$code.".".e_DOMAIN,e_SELF)."?".e_QUERY : str_replace($_SERVER['HTTP_HOST'],$code.".".e_DOMAIN,e_SELF);
|
||||
}
|
||||
else{
|
||||
$link = (e_QUERY) ? e_SELF."?[".$code."]".e_QUERY : e_SELF."?[".$code."]";
|
||||
}
|
||||
if(isset($pref['multilanguage_subdomain']) && $pref['multilanguage_subdomain'] && $val == $pref['sitelanguage']){
|
||||
$link = str_replace($code.$pref['multilanguage_subdomain'],"www".$pref['multilanguage_subdomain'],$link);
|
||||
$link = str_replace($code.".".e_DOMAIN,"www.".e_DOMAIN,$link);
|
||||
}
|
||||
$class = ($val == e_LANGUAGE) ? "languagelink_active" : "languagelink";
|
||||
$ret[] = "<a class='{$class}' href='{$link}' title=\"".$name."\">".$name."</a>\n";
|
||||
|
Reference in New Issue
Block a user