From c5af39239f7f2a1725d9c08bea80522de8835e0f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 19 Aug 2009 00:13:51 -0700 Subject: A better purge of trash folder. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 31 +++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 48c7f4e..5e2eb73 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -477,7 +477,11 @@ namespace OpenSim.Region.Framework.Scenes if (!Permissions.BypassPermissions()) { if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) - InventoryService.DeleteItem(new InventoryItemBase(itemId)); + { + List items = new List(); + items.Add(itemId); + InventoryService.DeleteItems(senderId, items); + } } return itemCopy; @@ -652,7 +656,9 @@ namespace OpenSim.Region.Framework.Scenes item.Folder = folderID; // Diva comment: can't we just update? - InventoryService.DeleteItem(item); + List uuids = new List(); + uuids.Add(item.ID); + InventoryService.DeleteItems(item.Owner, uuids); AddInventoryItem(remoteClient, item); } @@ -799,9 +805,10 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID) + private void RemoveInventoryItem(IClientAPI remoteClient, List itemIDs) { - InventoryService.DeleteItem(new InventoryItemBase(itemID)); + //m_log.Debug("[SCENE INVENTORY]: user " + remoteClient.AgentId); + InventoryService.DeleteItems(remoteClient.AgentId, itemIDs); } /// @@ -1248,7 +1255,11 @@ namespace OpenSim.Region.Framework.Scenes if (!Permissions.BypassPermissions()) { if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) - RemoveInventoryItem(remoteClient, itemID); + { + List uuids = new List(); + uuids.Add(itemID); + RemoveInventoryItem(remoteClient, uuids); + } } } else @@ -2144,7 +2155,11 @@ namespace OpenSim.Region.Framework.Scenes // copy ones will be lost, so avoid it // if (!attachment) - InventoryService.DeleteItem(item); + { + List uuids = new List(); + uuids.Add(item.ID); + InventoryService.DeleteItems(item.Owner, uuids); + } } } @@ -2404,7 +2419,9 @@ namespace OpenSim.Region.Framework.Scenes } part.ParentGroup.DetachToGround(); - InventoryService.DeleteItem(new InventoryItemBase(inventoryID)); + List uuids = new List(); + uuids.Add(inventoryID); + InventoryService.DeleteItems(remoteClient.AgentId, uuids); remoteClient.SendRemoveInventoryItem(inventoryID); } SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); -- cgit v1.1