diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
commit | c9868071b113b251e03d95163118b696e28bbe98 (patch) | |
tree | 8428d2e97f7a61b1a10e7e10494199a39969369d /indra/newview/llweb.cpp | |
parent | e833e7ad442f5b59f95c6ccfcaaf1d103d247d69 (diff) | |
parent | e8659e0e13c65308ad2f036dc7e7ccff0e665976 (diff) |
Merge from trunk. Conflicts manually resolved in:
U indra/llui/lluictrlfactory.cpp
U indra/newview/llinventorybridge.cpp
U indra/newview/llviewertexture.cpp
U indra/newview/llviewertexture.h
Diffstat (limited to 'indra/newview/llweb.cpp')
-rw-r--r-- | indra/newview/llweb.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index f8bb7336db..7866f735c5 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,10 +38,12 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() +#include "llagent.h" #include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" #include "lllogininstance.h" +#include "llparcel.h" #include "llsd.h" #include "lltoastalertpanel.h" #include "llui.h" @@ -49,6 +51,8 @@ #include "llversioninfo.h" #include "llviewercontrol.h" #include "llviewernetwork.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" #include "llviewerwindow.h" class URLLoader : public LLToastAlertPanel::URLLoader @@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["SESSION_ID"] = gAgent.getSessionID(); + // find the region ID + LLUUID region_id; + LLViewerRegion *region = gAgent.getRegion(); + if (region) + { + region_id = region->getRegionID(); + } + substitution["REGION_ID"] = region_id; + + // find the parcel ID + LLUUID parcel_id; + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (parcel) + { + parcel_id = parcel->getID(); + } + substitution["PARCEL_ID"] = parcel_id; + + // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); |