diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/InventoryService/XInventoryService.cs | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index a094a02..0af35c8 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -411,30 +411,12 @@ 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 | { | 414 | return false; |
415 | // We must still allow links and links to folders to be deleted, otherwise they will build up | 415 | |
416 | // in the player's inventory until they can no longer log in. Deletions of links due to code bugs or | 416 | // Just use the ID... *facepalms* |
417 | // similar is inconvenient but on a par with accidental movement of items. The original item is never | 417 | // |
418 | // touched. | 418 | foreach (UUID id in itemIDs) |
419 | foreach (UUID id in itemIDs) | 419 | m_Database.DeleteItems("inventoryID", id.ToString()); |
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 | } | ||
438 | 420 | ||
439 | return true; | 421 | return true; |
440 | } | 422 | } |