mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Changed: Support new forums URLs
This commit is contained in:
parent
aa0720fb82
commit
d3d28c4756
1 changed files with 13 additions and 3 deletions
|
@ -1910,16 +1910,26 @@ class CAHOpenURL : public IActionHandler
|
|||
return;
|
||||
}
|
||||
|
||||
// modify existing languages
|
||||
|
||||
// old site
|
||||
string::size_type pos_lang = url.find("/en/");
|
||||
|
||||
if(pos_lang!=string::npos)
|
||||
url.replace(pos_lang+1, 2, ClientCfg.getHtmlLanguageCode());
|
||||
// or new forums
|
||||
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 += "&";
|
||||
else
|
||||
url += "?";
|
||||
|
||||
url += "language=" + ClientCfg.LanguageCode;
|
||||
|
||||
openURL(url.c_str());
|
||||
|
||||
nlinfo("openURL %s", url.c_str());
|
||||
|
|
Loading…
Reference in a new issue