diff options
author | Lynx Linden <lynx@lindenlab.com> | 2009-11-11 00:25:33 +0000 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2009-11-11 00:25:33 +0000 |
commit | a3017978d3b4134c2408eb4e3124d8725a9f4733 (patch) | |
tree | 0c84ee3643e04123503a3188cf3588f2bda5d2b4 /indra/newview/llfloatersearch.cpp | |
parent | 2d5c6ea8207664ed3ef5de356638f7e30b812836 (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/llfloatersearch.cpp')
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 7 |
1 files changed, 7 insertions, 0 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); } |