diff options
author | Andrew A. de Laix <alain@lindenlab.com> | 2011-06-15 15:12:42 -0700 |
---|---|---|
committer | Andrew A. de Laix <alain@lindenlab.com> | 2011-06-15 15:12:42 -0700 |
commit | 0fb93246b36b356362e1899eab2d67c8931d9471 (patch) | |
tree | af2fb0edb9b86f18ecea9586e14b252717bb60ae /indra/newview | |
parent | 92a47165be54de4dd6bf42bc9472d2fc54f7169e (diff) |
Fix VWR-24099: disable teleport button when too many friends are selected; we keep the warning dialog as a failsafe.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index cbbdcb2983..955f19c82c 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -773,6 +773,10 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) // static bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) { + // We can't send more than 250 lures in a single message, so disable this + // button when there are too many id's selected. + if(ids.size() > 250) return false; + bool result = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 435b2e063d..ae36a2292f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6266,11 +6266,14 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { - if(notification["payload"]["ids"].size() > 250) + static const unsigned OFFER_RECIPIENT_LIMIT = 250; + if(notification["payload"]["ids"].size() > OFFER_RECIPIENT_LIMIT) { - // More than 250 targets will overload the message. + // More than OFFER_RECIPIENT_LIMIT targets will overload the message + // producing an llerror. LLSD args; args["OFFERS"] = notification["payload"]["ids"].size(); + args["LIMIT"] = static_cast<int>(OFFER_RECIPIENT_LIMIT); LLNotificationsUtil::add("TooManyTeleportOffers", args); return false; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 21680772ba..6707a09ddf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3700,8 +3700,8 @@ Join me in [REGION] icon="alertmodal.tga" name="TooManyTeleportOffers" type="alertmodal"> -You attempted to make [OFFERS] teleport offers; -250 are the most that can be done at one time +You attempted to make [OFFERS] teleport offers +which exceeds the limit of [LIMIT]. <tag>group</tag> <tag>fail</tag> <usetemplate |