diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-10-06 16:50:04 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-10-06 16:50:04 -0700 |
commit | f974a019b19a68fee219eb1b4e80d6dc5c5df92e (patch) | |
tree | f111aae3154b1ead0daa317c4e2eb8d218f8bbf8 /indra | |
parent | f5b3fc596d029d3ac2f953ee94ea3ae131d00940 (diff) |
Added DisableExternalBrowser setting.
Reviewed by Callum.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llweb.cpp | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 345a1f3576..204097769a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2545,6 +2545,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>DisableExternalBrowser</key> + <map> + <key>Comment</key> + <string>Disable opening an external browser.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DisableRendering</key> <map> <key>Comment</key> diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 73a37a6993..6028a8fbea 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -116,6 +116,13 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin // Act like the proxy window was closed, since we won't be able to track targeted windows in the external browser. LLViewerMedia::proxyWindowClosed(uuid); + if(gSavedSettings.getBOOL("DisableExternalBrowser")) + { + // Don't open an external browser under any circumstances. + llwarns << "Blocked attempt to open external browser." << llendl; + return; + } + LLSD payload; payload["url"] = url; LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async)); |