summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersearch.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2009-11-02 18:08:04 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2009-11-02 18:08:04 +0200
commit3dc509bec08d39d44c8a2c1e81d31922a6c11239 (patch)
tree171e8b91df89fc581eb7189c2ed45a450aadef41 /indra/newview/llfloatersearch.cpp
parentb06bc5944c23ccadfb6c99c65f4d498acc5e2a2d (diff)
parent265805a1b02555c01f9f2ac42000dbc731ab31c6 (diff)
merge
--HG-- branch : product-engine
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);
}