summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-11-11 00:25:33 +0000
committerLynx Linden <lynx@lindenlab.com>2009-11-11 00:25:33 +0000
commita3017978d3b4134c2408eb4e3124d8725a9f4733 (patch)
tree0c84ee3643e04123503a3188cf3588f2bda5d2b4 /indra/newview
parent2d5c6ea8207664ed3ef5de356638f7e30b812836 (diff)
DEV-41358: Added user's preferred maturity level to search URL.
The Search URL now includes a "r=" query parameter to specify the user's preferred maturity rating. This can be "pg" or "pg,mature" or "pg,mature,adult".
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatersearch.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml2
2 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 97c573ddea..ca2cdffcf8 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -36,6 +36,7 @@
#include "llmediactrl.h"
#include "lllogininstance.h"
#include "lluri.h"
+#include "llagent.h"
LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
LLFloater(key),
@@ -122,6 +123,12 @@ void LLFloaterSearch::search(const LLSD &key)
LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
url += "&p=" + search_token.asString();
+ // also append the user's preferred maturity (can be changed via prefs)
+ std::string maturity = "pg";
+ if (gAgent.prefersMature()) maturity += ",mature";
+ if (gAgent.prefersAdult()) maturity += ",adult";
+ url += "&r=" + maturity;
+
// and load the URL in the web view
mBrowser->navigateTo(url);
}
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index edc1fb8838..b9cf456842 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_resize="true"
- height="400"
+ height="512"
layout="topleft"
min_height="140"
min_width="467"