summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersearch.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-11-03 13:39:02 -0800
committerBryan O'Sullivan <bos@lindenlab.com>2009-11-03 13:39:02 -0800
commit28ed8f84d86403cf90b7963b147d2ac5c6cf37c7 (patch)
treecebb2895642b96aa64e8cf8c2eb402e8423165d6 /indra/newview/llfloatersearch.cpp
parent9c3595465972ba4be916e871f6b0a62cc0c13d4a (diff)
parent63b9bd43ff41da01d549f630bd838caff0dffd97 (diff)
Merge with SVN render-pipeline-8 branch
Diffstat (limited to 'indra/newview/llfloatersearch.cpp')
-rw-r--r--indra/newview/llfloatersearch.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 4c83530f43..bd9798c18e 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -34,6 +34,7 @@
#include "llviewerprecompiledheaders.h"
#include "llfloatersearch.h"
#include "llmediactrl.h"
+#include "llagent.h"
LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
@@ -117,6 +118,14 @@ void LLFloaterSearch::search(const LLSD &key)
std::string search_text = key.has("id") ? key["id"].asString() : "";
url += std::string("?q=") + search_text;
+ // append the maturity and teen capabilities for this agent
+ BOOL godlike = gAgent.isGodlike();
+ bool mature_enabled = gAgent.canAccessMature() || godlike;
+ bool adult_enabled = gAgent.canAccessAdult() || godlike;
+ std::string mature = (mature_enabled) ? "True" : "False";
+ std::string teen = (!adult_enabled) ? "True" : "False";
+ url += "&t=" + teen + "&m=" + mature;
+
// and load the URL in the web view
mBrowser->navigateTo(url);
}