diff options
author | angela <angela@lindenlab.com> | 2009-11-03 11:06:59 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2009-11-03 11:06:59 +0800 |
commit | 399e922d33ae36d415431a512020771e058454cd (patch) | |
tree | a1e9651a4f625d799a70c62f51c2b9dd680dbb5a /indra/newview | |
parent | e12d1371cc044560fb892d222acc253f7a015f0c (diff) | |
parent | d8b3e7a021b97bf3cb4494c4d9228ed0a3c16738 (diff) |
merge + EXT-1926 I18N: the folder name Contents in Build tools > Contents wont honor its translation + EXT-648 Cannot edit an object you are sitting on
Diffstat (limited to 'indra/newview')
-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); } |