summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterpreference.cpp16
-rw-r--r--indra/newview/llpaneldirbrowser.cpp24
-rw-r--r--indra/newview/llpaneldirevents.cpp11
-rw-r--r--indra/newview/llpaneldirland.cpp14
-rw-r--r--indra/newview/llpaneldirplaces.cpp11
5 files changed, 26 insertions, 50 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index c5c1e01538..6e27fd694a 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1735,6 +1735,22 @@ void LLFloaterPreference::onChangeMaturity()
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
+
+ // Update Legacy Search maturity settings
+ bool can_access_mature = gAgent.canAccessMature();
+ bool can_access_adult = gAgent.canAccessAdult();
+ if (!can_access_mature)
+ {
+ gSavedSettings.setBOOL("ShowMatureSims", false);
+ gSavedSettings.setBOOL("ShowMatureLand", false);
+ gSavedSettings.setBOOL("ShowMatureClassifieds", false);
+ }
+ if (!can_access_adult)
+ {
+ gSavedSettings.setBOOL("ShowAdultSims", false);
+ gSavedSettings.setBOOL("ShowAdultLand", false);
+ gSavedSettings.setBOOL("ShowAdultClassifieds", false);
+ }
}
void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue)
diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp
index 8c981cad55..69329c4ea4 100644
--- a/indra/newview/llpaneldirbrowser.cpp
+++ b/indra/newview/llpaneldirbrowser.cpp
@@ -559,9 +559,6 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**)
LLUUID owner_id;
std::string name;
std::string date;
- bool show_pg = gSavedSettings.getBOOL("ShowPGEvents");
- bool show_mature = gSavedSettings.getBOOL("ShowMatureEvents");
- bool show_adult = gSavedSettings.getBOOL("ShowAdultEvents");
msg->getUUID("AgentData", "AgentID", agent_id);
msg->getUUID("QueryData", "QueryID", query_id );
@@ -618,27 +615,6 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**)
LL_WARNS() << "skipped event due to owner_id null, event_id " << event_id << LL_ENDL;
continue;
}
-
- // skip events that don't match the flags
- // there's no PG flag, so we make sure neither adult nor mature is set
- if (((event_flags & (EVENT_FLAG_ADULT | EVENT_FLAG_MATURE)) == EVENT_FLAG_NONE) && !show_pg)
- {
- //llwarns << "Skipped pg event because we're not showing pg, event_id " << event_id << llendl;
- continue;
- }
-
- if ((event_flags & EVENT_FLAG_MATURE) && !show_mature)
- {
- //llwarns << "Skipped mature event because we're not showing mature, event_id " << event_id << llendl;
- continue;
- }
-
- if ((event_flags & EVENT_FLAG_ADULT) && !show_adult)
- {
- //llwarns << "Skipped adult event because we're not showing adult, event_id " << event_id << llendl;
- continue;
- }
-
LLSD content;
content["type"] = EVENT_CODE;
diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp
index 227ed877cd..7ac1229637 100644
--- a/indra/newview/llpaneldirevents.cpp
+++ b/indra/newview/llpaneldirevents.cpp
@@ -143,18 +143,17 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id)
static LLUICachedControl<bool> incpg("ShowPGEvents", true);
static LLUICachedControl<bool> incmature("ShowMatureEvents", false);
static LLUICachedControl<bool> incadult("ShowAdultEvents", false);
+ if (!(incpg || incmature || incadult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
U32 scope = DFQ_DATE_EVENTS;
if (incpg) scope |= DFQ_INC_PG;
if (incmature && gAgent.canAccessMature()) scope |= DFQ_INC_MATURE;
if (incadult && gAgent.canAccessAdult()) scope |= DFQ_INC_ADULT;
- if ( !( scope & (DFQ_INC_PG | DFQ_INC_MATURE | DFQ_INC_ADULT )))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
-
setupNewSearch();
std::ostringstream params;
diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp
index 53c58d8fa9..f85a8b948e 100644
--- a/indra/newview/llpaneldirland.cpp
+++ b/indra/newview/llpaneldirland.cpp
@@ -62,20 +62,6 @@ bool LLPanelDirLand::postBuild()
childSetValue("type", gSavedSettings.getString("FindLandType"));
- bool adult_enabled = gAgent.canAccessAdult();
- bool mature_enabled = gAgent.canAccessMature();
- childSetVisible("incpg", true);
- if (!mature_enabled)
- {
- childSetValue("incmature", false);
- childDisable("incmature");
- }
- if (!adult_enabled)
- {
- childSetValue("incadult", false);
- childDisable("incadult");
- }
-
childSetCommitCallback("pricecheck", onCommitPrice, this);
childSetCommitCallback("areacheck", onCommitArea, this);
diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp
index 2d54566038..3501baf697 100644
--- a/indra/newview/llpaneldirplaces.cpp
+++ b/indra/newview/llpaneldirplaces.cpp
@@ -121,6 +121,11 @@ void LLPanelDirPlaces::performQuery()
static LLUICachedControl<bool> inc_pg("ShowPGSims", true);
static LLUICachedControl<bool> inc_mature("ShowMatureSims", false);
static LLUICachedControl<bool> inc_adult("ShowAdultSims", false);
+ if (!(inc_pg || inc_mature || inc_adult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
if (inc_pg)
{
@@ -137,12 +142,6 @@ void LLPanelDirPlaces::performQuery()
flags |= DFQ_INC_ADULT;
}
- if (0x0 == flags)
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
-
queryCore(query_string, category, flags);
}