From 9a5ebdb1af723eed134d9e4e7ef4c7219a45f27b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 4 Jul 2014 15:05:28 -0700 Subject: DD-128 : Fixed. Do not allow clothes or body parts on active listings to be worn or rendered IW --- indra/newview/llinventoryfunctions.cpp | 19 +++++++++++++++---- indra/newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'indra') 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 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::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 @@ -356,6 +356,14 @@ This listing could not be updated. yestext="OK"/> + + You can not wear clothes or body parts that are on the Marketplace. + fail + +