diff options
| author | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-02 12:13:52 -0500 |
|---|---|---|
| committer | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-02 12:13:52 -0500 |
| commit | cdf639087011dc7f4510cedd9951e8d890818b97 (patch) | |
| tree | 6d70a6994ab11f0677370dda4f80a205d00660a1 /indra/newview/llfloatersearch.cpp | |
| parent | 7335c6276865061d8b4a549b7cf29f8a8df929a0 (diff) | |
| parent | 3783852444825edf420e6109927df21fd004c3e7 (diff) | |
merging in viewer2 changes
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llfloatersearch.cpp')
| -rw-r--r-- | indra/newview/llfloatersearch.cpp | 9 |
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); } |
