From f7120956f50afb3ffae269819ffbd7f07b1ac85b Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 4 Feb 2010 09:21:02 +0000 Subject: EXT-4898: Convert "en-us" to "en" for url substitutions. The correct and general fix is to change English.lproj/language.txt. This fix here is a more targeted and less risky fix at this stage of the release cycle. --- indra/newview/llweb.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 7866f735c5..3def17f33c 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -145,11 +145,20 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); substitution["CHANNEL"] = LLVersionInfo::getChannel(); - substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); 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 LLUUID region_id; LLViewerRegion *region = gAgent.getRegion(); -- cgit v1.2.3 From 6c992c95a98ec69e77455129098338dce2f092aa Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 4 Feb 2010 10:23:24 +0000 Subject: EXT-3681: Send Parcel "Local ID" (S32) to web pages. This is instead of sending the Parcel ID (LLUUID), which it turns out the server never sends to the viewer (LLParcel::getID() always returns NULL). --- indra/newview/llweb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 3def17f33c..100ec0bb69 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -168,14 +168,14 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, } substitution["REGION_ID"] = region_id; - // find the parcel ID - LLUUID parcel_id; + // find the parcel local ID + S32 parcel_id = 0; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); 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 std::string expanded_url = url; -- cgit v1.2.3