diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-12-16 14:56:18 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-12-16 14:56:18 +0200 |
commit | 734f37816ef35089bc0f5710dc1f9684bc5b9b69 (patch) | |
tree | 38bcf9ca3bce50b9d0fba8b717b910bcbba638d7 /indra/newview/llweb.cpp | |
parent | e398f41074f40c0779d7cc29a8127540ac78b1f9 (diff) | |
parent | 88291b378eda6178ae3f2cbda60feddf0e68e3fa (diff) |
Merge from default branch.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llweb.cpp')
-rw-r--r-- | indra/newview/llweb.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index c056c84e19..f8bb7336db 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,11 +38,18 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() -#include "llviewerwindow.h" -#include "llviewercontrol.h" +#include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" +#include "lllogininstance.h" +#include "llsd.h" #include "lltoastalertpanel.h" +#include "llui.h" +#include "lluri.h" +#include "llversioninfo.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerwindow.h" class URLLoader : public LLToastAlertPanel::URLLoader { @@ -122,3 +129,24 @@ std::string LLWeb::escapeURL(const std::string& url) } return escaped_url; } + +//static +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) +{ + LLSD substitution = default_subs; + substitution["VERSION"] = LLVersionInfo::getVersion(); + substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor(); + substitution["VERSION_MINOR"] = LLVersionInfo::getMinor(); + 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(); + + std::string expanded_url = url; + LLStringUtil::format(expanded_url, substitution); + + return LLWeb::escapeURL(expanded_url); +} |