Fixed: Bug with language in URLs
This commit is contained in:
parent
45fb738e8a
commit
cdd85cbe57
1 changed files with 12 additions and 8 deletions
|
@ -1916,12 +1916,15 @@ class CAHOpenURL : public IActionHandler
|
||||||
string::size_type pos_lang = url.find("/en/");
|
string::size_type pos_lang = url.find("/en/");
|
||||||
|
|
||||||
// or new forums
|
// or new forums
|
||||||
if (pos_lang != string::npos)
|
if (pos_lang == string::npos)
|
||||||
pos_lang = url.find("=en#");
|
pos_lang = url.find("=en#");
|
||||||
|
|
||||||
if (pos_lang == string::npos)
|
if (pos_lang != string::npos)
|
||||||
|
{
|
||||||
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
|
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// append language
|
// append language
|
||||||
if (url.find('?') != string::npos)
|
if (url.find('?') != string::npos)
|
||||||
url += "&";
|
url += "&";
|
||||||
|
@ -1929,6 +1932,7 @@ class CAHOpenURL : public IActionHandler
|
||||||
url += "?";
|
url += "?";
|
||||||
|
|
||||||
url += "language=" + ClientCfg.LanguageCode;
|
url += "language=" + ClientCfg.LanguageCode;
|
||||||
|
}
|
||||||
|
|
||||||
openURL(url.c_str());
|
openURL(url.c_str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue