From a3017978d3b4134c2408eb4e3124d8725a9f4733 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 11 Nov 2009 00:25:33 +0000 Subject: 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". --- indra/newview/llfloatersearch.cpp | 7 +++++++ indra/newview/skins/default/xui/en/floater_search.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 @@