diff options
author | Oz Linden <oz@lindenlab.com> | 2012-08-16 08:52:26 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-08-16 08:52:26 -0400 |
commit | a7d8b425097a7fab0a5a40d6a6b5770deb0bb7f9 (patch) | |
tree | 81e800d495674faa37d66c18db36cbfccd7fc5eb /indra/newview/llpanelgroupinvite.cpp | |
parent | df93749819c503a66bc0ad34aeb1c7bed3746df2 (diff) | |
parent | b9e43dfd646990be236e44814ce3199de3391dc1 (diff) |
merge up to latest viewer-development
Diffstat (limited to 'indra/newview/llpanelgroupinvite.cpp')
-rw-r--r-- | indra/newview/llpanelgroupinvite.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 7a15d93181..00dd206571 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -83,6 +83,7 @@ public: LLTextBox *mGroupName; std::string mOwnerWarning; std::string mAlreadyInGroup; + std::string mTooManySelected; bool mConfirmedOwnerInvite; void (*mCloseCallback)(void* data); @@ -185,6 +186,17 @@ void LLPanelGroupInvite::impl::submitInvitations() role_member_pairs[item->getUUID()] = role_id; } + const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap. + if (role_member_pairs.size() > MAX_GROUP_INVITES) + { + // Fail! + LLSD msg; + msg["MESSAGE"] = mTooManySelected; + LLNotificationsUtil::add("GenericAlert", msg); + (*mCloseCallback)(mCloseCallbackUserData); + return; + } + LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs); if(already_in_group) @@ -621,6 +633,7 @@ BOOL LLPanelGroupInvite::postBuild() mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); mImplementation->mAlreadyInGroup = getString("already_in_group"); + mImplementation->mTooManySelected = getString("invite_selection_too_large"); update(); |