summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupinvite.cpp
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-07-13 11:10:40 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-07-13 11:10:40 -0700
commit7cd5f7d479b889c3dcdb4bcd0ee6b65b5b5a025f (patch)
treef0ec4e77540edd8680f41ae1719e9b66f279fd60 /indra/newview/llpanelgroupinvite.cpp
parente86b1c18db0629d64f8bf26fcf69e64072d084e6 (diff)
parent3a56fbf867194ec8fbc7d8237f9781ac9d72c8a4 (diff)
Merge from lindenlab/viewmaster so we can get rid of it
Diffstat (limited to 'indra/newview/llpanelgroupinvite.cpp')
-rw-r--r--indra/newview/llpanelgroupinvite.cpp13
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();