aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/InventoryService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/InventoryService')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 0af35c8..a094a02 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -411,12 +411,30 @@ namespace OpenSim.Services.InventoryService
411 public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs) 411 public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs)
412 { 412 {
413 if (!m_AllowDelete) 413 if (!m_AllowDelete)
414 return false; 414 {
415 415 // We must still allow links and links to folders to be deleted, otherwise they will build up
416 // Just use the ID... *facepalms* 416 // in the player's inventory until they can no longer log in. Deletions of links due to code bugs or
417 // 417 // similar is inconvenient but on a par with accidental movement of items. The original item is never
418 foreach (UUID id in itemIDs) 418 // touched.
419 m_Database.DeleteItems("inventoryID", id.ToString()); 419 foreach (UUID id in itemIDs)
420 {
421 if (!m_Database.DeleteItems(
422 new string[] { "inventoryID", "assetType" },
423 new string[] { id.ToString(), ((sbyte)AssetType.Link).ToString() }));
424 {
425 m_Database.DeleteItems(
426 new string[] { "inventoryID", "assetType" },
427 new string[] { id.ToString(), ((sbyte)AssetType.LinkFolder).ToString() });
428 }
429 }
430 }
431 else
432 {
433 // Just use the ID... *facepalms*
434 //
435 foreach (UUID id in itemIDs)
436 m_Database.DeleteItems("inventoryID", id.ToString());
437 }
420 438
421 return true; 439 return true;
422 } 440 }