summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
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 /indra/newview/llinventoryfunctions.cpp
parent18579f8eedb4d31ded2658dd5d8d1f82477a5d56 (diff)
DD-128 : Fixed. Do not allow clothes or body parts on active listings to be worn or rendered IW
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp19
1 files changed, 15 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;
}
}