Changed: Support new forums URLs
--HG-- branch : compatibility-develop
This commit is contained in:
parent
9cfebf3eb3
commit
53783c0e71
1 changed files with 13 additions and 3 deletions
|
@ -1910,16 +1910,26 @@ class CAHOpenURL : public IActionHandler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// modify existing languages
|
||||||
|
|
||||||
|
// old site
|
||||||
string::size_type pos_lang = url.find("/en/");
|
string::size_type pos_lang = url.find("/en/");
|
||||||
|
|
||||||
if(pos_lang!=string::npos)
|
// or new forums
|
||||||
url.replace(pos_lang+1, 2, ClientCfg.getHtmlLanguageCode());
|
if (pos_lang != string::npos)
|
||||||
|
pos_lang = url.find("=en#");
|
||||||
|
|
||||||
if(url.find('?')!=string::npos)
|
if (pos_lang != string::npos)
|
||||||
|
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
|
||||||
|
|
||||||
|
// append language
|
||||||
|
if (url.find('?') != string::npos)
|
||||||
url += "&";
|
url += "&";
|
||||||
else
|
else
|
||||||
url += "?";
|
url += "?";
|
||||||
|
|
||||||
url += "language=" + ClientCfg.LanguageCode;
|
url += "language=" + ClientCfg.LanguageCode;
|
||||||
|
|
||||||
openURL(url.c_str());
|
openURL(url.c_str());
|
||||||
|
|
||||||
nlinfo("openURL %s", url.c_str());
|
nlinfo("openURL %s", url.c_str());
|
||||||
|
|
Loading…
Reference in a new issue