|
|
|
@ -903,16 +903,76 @@ void CClientConfig::setValues()
|
|
|
|
|
READ_STRING_FV(FSHost)
|
|
|
|
|
|
|
|
|
|
READ_BOOL_DEV(DisplayAccountButtons)
|
|
|
|
|
READ_STRING_DEV(CreateAccountURL)
|
|
|
|
|
READ_STRING_DEV(EditAccountURL)
|
|
|
|
|
READ_STRING_DEV(ForgetPwdURL)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
READ_STRING_FV(CreateAccountURL)
|
|
|
|
|
READ_STRING_FV(EditAccountURL)
|
|
|
|
|
READ_STRING_FV(ForgetPwdURL)
|
|
|
|
|
|
|
|
|
|
READ_STRING_DEV(BetaAccountURL)
|
|
|
|
|
READ_STRING_DEV(FreeTrialURL)
|
|
|
|
|
|
|
|
|
|
// defined in client_default.cfg
|
|
|
|
|
READ_STRING_FV(ConditionsTermsURL)
|
|
|
|
|
READ_STRING_FV(NamingPolicyURL)
|
|
|
|
|
READ_STRING_FV(LoginSupportURL)
|
|
|
|
|
|
|
|
|
|
// read NamingPolicyURL from client_default.cfg
|
|
|
|
|
//READ_STRING_FV(NamingPolicyURL)
|
|
|
|
|
|
|
|
|
|
std::string languageCo = "wk";
|
|
|
|
|
CConfigFile::CVar *languageCodeVarPtr = ClientCfg.ConfigFile.getVarPtr("LanguageCode");
|
|
|
|
|
|
|
|
|
|
if (languageCodeVarPtr)
|
|
|
|
|
{
|
|
|
|
|
languageCo = languageCodeVarPtr->asString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CConfigFile::CVar *policyurl = ClientCfg.ConfigFile.getVarPtr("NamingPolicyURL");
|
|
|
|
|
|
|
|
|
|
if (policyurl)
|
|
|
|
|
{
|
|
|
|
|
for (uint i = 0; i < policyurl->size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
std::string entry = policyurl->asString(i);
|
|
|
|
|
if (entry.size() >= languageCo.size())
|
|
|
|
|
{
|
|
|
|
|
if (nlstricmp(entry.substr(0, languageCo.size()), languageCo) == 0)
|
|
|
|
|
{
|
|
|
|
|
std::string::size_type pos = entry.find("=");
|
|
|
|
|
|
|
|
|
|
if (pos != std::string::npos)
|
|
|
|
|
{
|
|
|
|
|
ClientCfg.NamingPolicyURL = entry.substr(pos + 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// read NamingPolicyURL from client_default.cfg
|
|
|
|
|
//READ_STRING_FV(ConditionsTermsURL)
|
|
|
|
|
CConfigFile::CVar *coturl = ClientCfg.ConfigFile.getVarPtr("ConditionsTermsURL");
|
|
|
|
|
|
|
|
|
|
if (coturl)
|
|
|
|
|
{
|
|
|
|
|
for (uint i = 0; i < coturl->size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
std::string entry = coturl->asString(i);
|
|
|
|
|
|
|
|
|
|
if (entry.size() >= languageCo.size())
|
|
|
|
|
{
|
|
|
|
|
if (nlstricmp(entry.substr(0, languageCo.size()), languageCo) == 0)
|
|
|
|
|
{
|
|
|
|
|
std::string::size_type pos = entry.find("=");
|
|
|
|
|
|
|
|
|
|
if (pos != std::string::npos)
|
|
|
|
|
{
|
|
|
|
|
ClientCfg.ConditionsTermsURL = entry.substr(pos + 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef RZ_NO_CLIENT
|
|
|
|
|
// if cookie is not empty, it means that the client was launch
|
|
|
|
|