summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersearch.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-02 11:29:37 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-02 11:29:37 -0500
commit7e086d46743d8cc3b51e494f0ca1d18829ab78ee (patch)
tree1f3e37516303910c32d3c10b8e5b2100c5e2b440 /indra/newview/llfloatersearch.cpp
parent5d64b6f15510aa74cc8e8bd31c1d16a4eec76746 (diff)
parent9fb250e34430c356852f6a3109d04e4c904dfc96 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
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);
}