Skip to content
Snippets Groups Projects
Commit fd095d27 authored by Tofu Linden's avatar Tofu Linden
Browse files

merge.

parents 14d942f1 a7c4f419
No related branches found
No related tags found
No related merge requests found
...@@ -145,11 +145,20 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, ...@@ -145,11 +145,20 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); substitution["VERSION_PATCH"] = LLVersionInfo::getPatch();
substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); substitution["VERSION_BUILD"] = LLVersionInfo::getBuild();
substitution["CHANNEL"] = LLVersionInfo::getChannel(); substitution["CHANNEL"] = LLVersionInfo::getChannel();
substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["SESSION_ID"] = gAgent.getSessionID();
// work out the current language
std::string lang = LLUI::getLanguage();
if (lang == "en-us")
{
// *HACK: the correct fix is to change English.lproj/language.txt,
// but we're late in the release cycle and this is a less risky fix
lang = "en";
}
substitution["LANGUAGE"] = lang;
// find the region ID // find the region ID
LLUUID region_id; LLUUID region_id;
LLViewerRegion *region = gAgent.getRegion(); LLViewerRegion *region = gAgent.getRegion();
...@@ -159,14 +168,14 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, ...@@ -159,14 +168,14 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
} }
substitution["REGION_ID"] = region_id; substitution["REGION_ID"] = region_id;
// find the parcel ID // find the parcel local ID
LLUUID parcel_id; S32 parcel_id = 0;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel) if (parcel)
{ {
parcel_id = parcel->getID(); parcel_id = parcel->getLocalID();
} }
substitution["PARCEL_ID"] = parcel_id; substitution["PARCEL_ID"] = llformat("%d", parcel_id);
// expand all of the substitution strings and escape the url // expand all of the substitution strings and escape the url
std::string expanded_url = url; std::string expanded_url = url;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment