Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/

meow-7.2.2
Lynx Linden 2010-02-04 10:24:57 +00:00
commit a7c4f419e7
1 changed files with 14 additions and 5 deletions

View File

@ -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();
@ -159,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;