diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-05-16 23:50:57 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-05-16 23:50:57 +0300 |
commit | b29c7173c68707c7173c5bc26e54047e8f751c15 (patch) | |
tree | f781ad4a06c3b3b8f97a3f78681f8c8679c366f8 /indra/newview | |
parent | 30df194a0a621aff57998a1cd7379e2a7f279acd (diff) |
MAINT-8581 Better handling of adding Estate Managers to Banned list
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 17 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index c6271209a8..1d7c13109d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3587,6 +3587,7 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) { LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list"); + LLNameListCtrl* em_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list"); int currentCount = (name_list ? name_list->getItemCount() : 0); if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) { @@ -3601,9 +3602,17 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) } std::string already_banned; + std::string em_ban; bool single = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { + LLScrollListItem* em_item = em_list->getNameItemByAgentId(*it); + if (em_item) + { + em_ban = em_item->getColumn(0)->getValue().asString(); + break; + } + LLScrollListItem* item = name_list->getNameItemByAgentId(*it); if (item) { @@ -3615,6 +3624,14 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) already_banned += item->getColumn(0)->getValue().asString(); } } + if (!em_ban.empty()) + { + LLSD args; + args["AGENT"] = em_ban; + LLNotificationsUtil::add("ProblemBanningEstateManager", args); + delete change_info; + return; + } if (!already_banned.empty()) { LLSD args; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index d139534328..98cd11fb6c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3808,6 +3808,13 @@ Unable to add banned resident to estate manager list. <notification icon="alertmodal.tga" + name="ProblemBanningEstateManager" + type="alertmodal"> +Unable to add estate manager [AGENT] to banned list. + </notification> + + <notification + icon="alertmodal.tga" name="AgentIsAlreadyInList" type="alertmodal"> [AGENT] is already in your [LIST_TYPE] list. |