From 78f1938fafad94e94427c51e97c751a4c1244862 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 23 Sep 2014 22:50:01 -0700 Subject: DD-110 : Prevent paste of Library items into the marketplace --- indra/newview/llinventoryfunctions.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index b4a07e20f2..31c88b39fc 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -984,7 +984,14 @@ bool can_move_to_marketplace(LLInventoryItem* inv_item, std::string& tooltip_msg tooltip_msg = LLTrans::getString("TooltipOutboxWorn"); return false; } - + + // Check library status: library items cannot be put on the marketplace + if (!gInventory.isObjectDescendentOf(inv_item->getUUID(), gInventory.getRootFolderID())) + { + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + return false; + } + // Check type: for the moment, calling cards cannot be put on the marketplace bool calling_card = (LLAssetType::AT_CALLINGCARD == inv_item->getType()); if (calling_card) @@ -1083,7 +1090,7 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve LLViewerInventoryCategory* view_folder = dynamic_cast(dest_folder); bool accept = (view_folder && view_folder->acceptItem(inv_item)); - // Check that the item has the right type and persimssions to be sold on the marketplace + // Check that the item has the right type and permissions to be sold on the marketplace if (accept) { accept = can_move_to_marketplace(inv_item, tooltip_msg, true); -- cgit v1.2.3