Changed: Minor changes
--HG-- branch : develop
This commit is contained in:
parent
c2c930035c
commit
831a3eb7b7
1 changed files with 5 additions and 0 deletions
|
@ -24,21 +24,26 @@ void browseFAQ(NLMISC::CConfigFile &cf)
|
||||||
std::string url;
|
std::string url;
|
||||||
std::string languageCode = "wk";
|
std::string languageCode = "wk";
|
||||||
CConfigFile::CVar *languageCodeVarPtr = cf.getVarPtr("LanguageCode");
|
CConfigFile::CVar *languageCodeVarPtr = cf.getVarPtr("LanguageCode");
|
||||||
|
|
||||||
if (languageCodeVarPtr)
|
if (languageCodeVarPtr)
|
||||||
{
|
{
|
||||||
languageCode = languageCodeVarPtr->asString();
|
languageCode = languageCodeVarPtr->asString();
|
||||||
}
|
}
|
||||||
|
|
||||||
CConfigFile::CVar *helpPages = cf.getVarPtr("HelpPages");
|
CConfigFile::CVar *helpPages = cf.getVarPtr("HelpPages");
|
||||||
|
|
||||||
if (helpPages)
|
if (helpPages)
|
||||||
{
|
{
|
||||||
for (uint i = 0; i < helpPages->size(); ++i)
|
for (uint i = 0; i < helpPages->size(); ++i)
|
||||||
{
|
{
|
||||||
std::string entry = helpPages->asString(i);
|
std::string entry = helpPages->asString(i);
|
||||||
|
|
||||||
if (entry.size() >= languageCode.size())
|
if (entry.size() >= languageCode.size())
|
||||||
{
|
{
|
||||||
if (nlstricmp(entry.substr(0, languageCode.size()), languageCode) == 0)
|
if (nlstricmp(entry.substr(0, languageCode.size()), languageCode) == 0)
|
||||||
{
|
{
|
||||||
std::string::size_type pos = entry.find("=");
|
std::string::size_type pos = entry.find("=");
|
||||||
|
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
{
|
{
|
||||||
url = entry.substr(pos + 1);
|
url = entry.substr(pos + 1);
|
||||||
|
|
Loading…
Reference in a new issue