diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
| commit | 0a7ac2fc170d0a2144eca924f5a0b8ffa8363ce4 (patch) | |
| tree | 4b224e6b5e55d37690b4639e05b893cd04a4058e /indra/newview/llfloatersearch.cpp | |
| parent | 86b1ee7703bb57c6b1e1c068cda02bfb9ed0721e (diff) | |
| parent | 3783852444825edf420e6109927df21fd004c3e7 (diff) | |
merge
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); } |
