diff options
author | Merov Linden <merov@lindenlab.com> | 2014-09-28 17:30:48 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-09-28 17:30:48 -0700 |
commit | 896f48229e577b1bcf94f2cb80d73a6bf1a9330c (patch) | |
tree | fb0b1b61b3f82ec21ad88d5dc7017ff58bfb06cc /indra | |
parent | 5bde459c79f65fb4846dd1b24fdfa974e18d529e (diff) |
DD-211 : Verify that the items have the right permissions when dropping in a stock folder, add an adequate message when failing to drop in a stock folder.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llinventoryfunctions.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llviewerinventory.cpp | 6 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 31c88b39fc..85a2e7b37b 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1089,6 +1089,10 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve // Check stock folder type matches item type in marketplace listings or merchant outbox (even if of no use there for the moment) LLViewerInventoryCategory* view_folder = dynamic_cast<LLViewerInventoryCategory*>(dest_folder); bool accept = (view_folder && view_folder->acceptItem(inv_item)); + if (!accept) + { + tooltip_msg = LLTrans::getString("TooltipOutboxMixedStock"); + } // Check that the item has the right type and permissions to be sold on the marketplace if (accept) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index a1f896d01f..d7a18fa48c 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -818,8 +818,10 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item) LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::item_array_t* item_array; gInventory.getDirectDescendentsOf(getUUID(),cat_array,item_array); - // Destination stock folder must be empty OR types of incoming and existing items must be identical - accept = (!item_array->size() || (item_array->at(0)->getInventoryType() == inv_item->getInventoryType())); + // Destination stock folder must be empty OR types of incoming and existing items must be identical and have the same permissions + accept = (!item_array->size() || + ((item_array->at(0)->getInventoryType() == inv_item->getInventoryType()) && + (item_array->at(0)->getPermissions().getMaskNextOwner() == inv_item->getPermissions().getMaskNextOwner()))); } } return accept; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 948af4401e..773f44fc46 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -247,6 +247,7 @@ Please try logging in again in a minute.</string> <string name="TooltipOutboxDragActive">You can't move a listed listing</string> <string name="TooltipOutboxCannotDropOnRoot">You can't drop items on filtered tabs root</string> <string name="TooltipOutboxCannotMoveRoot">You can't move the marketplace listings root folder</string> + <string name="TooltipOutboxMixedStock">All items in a stock folder must have the same type and permission</string> <string name="TooltipDragOntoOwnChild">You can't move a folder into its child</string> <string name="TooltipDragOntoSelf">You can't move a folder into itself</string> |