summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lliconctrl.cpp3
-rw-r--r--indra/newview/llfloatersearch.cpp9
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index b1bd2b89a9..82ffac9580 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -123,5 +123,4 @@ void LLIconCtrl::setIconImageDrawSize()
mImagep->getImage()->setKnownDrawSize(mDrawWidth, mDrawHeight) ;
}
}
-}
-
+} \ No newline at end of file
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);
}