summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneldirgroups.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneldirgroups.cpp')
-rw-r--r--indra/newview/llpaneldirgroups.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llpaneldirgroups.cpp b/indra/newview/llpaneldirgroups.cpp
index 992d92091c..324d84efde 100644
--- a/indra/newview/llpaneldirgroups.cpp
+++ b/indra/newview/llpaneldirgroups.cpp
@@ -51,6 +51,12 @@ bool LLPanelDirGroups::postBuild()
childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
setDefaultBtn( "Search" );
+ if (gAgent.isTeen())
+ {
+ childSetEnabled("incmature", false);
+ gSavedSettings.setBOOL("ShowMatureGroups", false);
+ }
+
return true;
}
@@ -72,11 +78,25 @@ void LLPanelDirGroups::performQuery()
U32 scope = DFQ_GROUPS;
// Check group mature filter.
- if ( !gSavedSettings.getBOOL("ShowMatureGroups") || gAgent.isTeen() )
+ if ( gSavedSettings.getBOOL("ShowMatureGroups") && !gAgent.isTeen() )
{
+ // Supposed behavior:
+ // if nothing is set will search for <= mature
+ // if DFQ_INC_PG is set, will look for <= PG
+ // if DFQ_INC_MATURE is set, will look for == mature
+ // if DFQ_INC_ADULT is set, will look for >= adult
+ // Not compatible with legacy DFQ_FILTER_MATURE.
+ // But there appears to be a server bug, so we only use
+ // this to show all and use legacy setting for 'pg only'
+ scope |= DFQ_INC_PG;
+ scope |= DFQ_INC_MATURE;
+ scope |= DFQ_INC_ADULT;
+ }
+ else
+ {
+ // DFQ_FILTER_MATURE is a legacy setting
scope |= DFQ_FILTER_MATURE;
}
-
mCurrentSortColumn = "score";
mCurrentSortAscending = false;