diff options
Diffstat (limited to 'indra/newview/llweb.cpp')
-rw-r--r-- | indra/newview/llweb.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 8026dc3ea8..b816225b07 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -192,7 +192,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["CHANNEL"] = LLVersionInfo::getChannel(); substitution["GRID"] = LLGridManager::getInstance()->getGridId(); substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridId()); - substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["OS"] = LLOSInfo::instance().getOSStringSimple(); substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); @@ -224,6 +224,22 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, } substitution["PARCEL_ID"] = llformat("%d", parcel_id); + // find the grid + std::string current_grid = LLGridManager::getInstance()->getGridId(); + std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower); + if (current_grid == "agni") + { + substitution["GRID"] = "secondlife.com"; + } + else if (current_grid == "damballah") + { + // Staging grid has its own naming scheme. + substitution["GRID"] = "secondlife-staging.com"; + } + else + { + substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str()); + } // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); |