summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-07-04 15:05:28 -0700
committerMerov Linden <merov@lindenlab.com>2014-07-04 15:05:28 -0700
commit9a5ebdb1af723eed134d9e4e7ef4c7219a45f27b (patch)
treed8a7f03cf3e38b66010f0772560d6198be71251e
parent18579f8eedb4d31ded2658dd5d8d1f82477a5d56 (diff)
DD-128 : Fixed. Do not allow clothes or body parts on active listings to be worn or rendered IW
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp19
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml8
2 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 84b8177e0d..63b1fa78fc 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1930,9 +1930,9 @@ void LLInventoryAction::callback_doToSelected(const LLSD& notification, const LL
void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm)
{
std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
-
- // Prompt the user for some marketplace active listing edits
- if (user_confirm && (("delete" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action)))
+
+ // Prompt the user and check for authorization for some marketplace active listing edits
+ if (user_confirm && (("delete" == action) || ("cut" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action) || ("open" == action)))
{
std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin();
LLFolderViewModelItemInventory * viewModel = NULL;
@@ -1950,13 +1950,24 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
// Cut or delete of the active version folder or listing folder itself will unlist the listing so ask that question specifically
LLNotificationsUtil::add("ConfirmMerchantUnlist", LLSD(), LLSD(), boost::bind(&LLInventoryAction::callback_doToSelected, _1, _2, model, root, action));
+ return;
+ }
+ else if ("open" == action)
+ {
+ if (get_can_item_be_worn(viewModel->getUUID()))
+ {
+ // Wearing an object from an active listing is verbotten
+ LLNotificationsUtil::add("AlertMerchantListingCannotWear");
+ return;
+ }
+ // Note: we do not prompt for active change when opening items (e.g. textures or note cards) on the marketplace...
}
else
{
// Any other case will simply modify but not unlist a listing
LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInventoryAction::callback_doToSelected, _1, _2, model, root, action));
+ return;
}
- return;
}
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 11c3ca14d0..a7e15ed27c 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -357,6 +357,14 @@ This listing could not be updated.
</notification>
<notification
+ icon="alertmodal.tga"
+ name="AlertMerchantListingCannotWear"
+ type="alertmodal">
+ You can not wear clothes or body parts that are on the Marketplace.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="CompileQueueSaveText"
type="alertmodal">