summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-09-23 22:50:01 -0700
committerMerov Linden <merov@lindenlab.com>2014-09-23 22:50:01 -0700
commit78f1938fafad94e94427c51e97c751a4c1244862 (patch)
treeb05a474f79b204aa1baa8dda3117098a07d41295 /indra
parent10b8f8952321eee959f1b4cf2255782c61683900 (diff)
DD-110 : Prevent paste of Library items into the marketplace
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp11
1 files changed, 9 insertions, 2 deletions
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<LLViewerInventoryCategory*>(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);