diff options
author | Diva Canto | 2009-08-19 00:13:51 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-19 00:13:51 -0700 |
commit | c5af39239f7f2a1725d9c08bea80522de8835e0f (patch) | |
tree | 44469c14f378b9146748f68a51fc82307b38065b /OpenSim/Region/Framework/Scenes | |
parent | GetFolderItems implemented. It's not being called, but it might. (diff) | |
download | opensim-SC-c5af39239f7f2a1725d9c08bea80522de8835e0f.zip opensim-SC-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.gz opensim-SC-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.bz2 opensim-SC-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.xz |
A better purge of trash folder.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 2 |
2 files changed, 25 insertions, 8 deletions
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 | |||
477 | if (!Permissions.BypassPermissions()) | 477 | if (!Permissions.BypassPermissions()) |
478 | { | 478 | { |
479 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 479 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
480 | InventoryService.DeleteItem(new InventoryItemBase(itemId)); | 480 | { |
481 | List<UUID> items = new List<UUID>(); | ||
482 | items.Add(itemId); | ||
483 | InventoryService.DeleteItems(senderId, items); | ||
484 | } | ||
481 | } | 485 | } |
482 | 486 | ||
483 | return itemCopy; | 487 | return itemCopy; |
@@ -652,7 +656,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
652 | item.Folder = folderID; | 656 | item.Folder = folderID; |
653 | 657 | ||
654 | // Diva comment: can't we just update? | 658 | // Diva comment: can't we just update? |
655 | InventoryService.DeleteItem(item); | 659 | List<UUID> uuids = new List<UUID>(); |
660 | uuids.Add(item.ID); | ||
661 | InventoryService.DeleteItems(item.Owner, uuids); | ||
656 | 662 | ||
657 | AddInventoryItem(remoteClient, item); | 663 | AddInventoryItem(remoteClient, item); |
658 | } | 664 | } |
@@ -799,9 +805,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
799 | /// </summary> | 805 | /// </summary> |
800 | /// <param name="remoteClient"></param> | 806 | /// <param name="remoteClient"></param> |
801 | /// <param name="itemID"></param> | 807 | /// <param name="itemID"></param> |
802 | private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID) | 808 | private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs) |
803 | { | 809 | { |
804 | InventoryService.DeleteItem(new InventoryItemBase(itemID)); | 810 | //m_log.Debug("[SCENE INVENTORY]: user " + remoteClient.AgentId); |
811 | InventoryService.DeleteItems(remoteClient.AgentId, itemIDs); | ||
805 | } | 812 | } |
806 | 813 | ||
807 | /// <summary> | 814 | /// <summary> |
@@ -1248,7 +1255,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1248 | if (!Permissions.BypassPermissions()) | 1255 | if (!Permissions.BypassPermissions()) |
1249 | { | 1256 | { |
1250 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 1257 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1251 | RemoveInventoryItem(remoteClient, itemID); | 1258 | { |
1259 | List<UUID> uuids = new List<UUID>(); | ||
1260 | uuids.Add(itemID); | ||
1261 | RemoveInventoryItem(remoteClient, uuids); | ||
1262 | } | ||
1252 | } | 1263 | } |
1253 | } | 1264 | } |
1254 | else | 1265 | else |
@@ -2144,7 +2155,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2144 | // copy ones will be lost, so avoid it | 2155 | // copy ones will be lost, so avoid it |
2145 | // | 2156 | // |
2146 | if (!attachment) | 2157 | if (!attachment) |
2147 | InventoryService.DeleteItem(item); | 2158 | { |
2159 | List<UUID> uuids = new List<UUID>(); | ||
2160 | uuids.Add(item.ID); | ||
2161 | InventoryService.DeleteItems(item.Owner, uuids); | ||
2162 | } | ||
2148 | } | 2163 | } |
2149 | } | 2164 | } |
2150 | 2165 | ||
@@ -2404,7 +2419,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2404 | } | 2419 | } |
2405 | part.ParentGroup.DetachToGround(); | 2420 | part.ParentGroup.DetachToGround(); |
2406 | 2421 | ||
2407 | InventoryService.DeleteItem(new InventoryItemBase(inventoryID)); | 2422 | List<UUID> uuids = new List<UUID>(); |
2423 | uuids.Add(inventoryID); | ||
2424 | InventoryService.DeleteItems(remoteClient.AgentId, uuids); | ||
2408 | remoteClient.SendRemoveInventoryItem(inventoryID); | 2425 | remoteClient.SendRemoveInventoryItem(inventoryID); |
2409 | } | 2426 | } |
2410 | SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); | 2427 | SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 1bbca49..a2414e5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -560,7 +560,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
560 | 560 | ||
561 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) | 561 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) |
562 | { | 562 | { |
563 | InventoryFolderBase folder = new InventoryFolderBase(folderID); | 563 | InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); |
564 | 564 | ||
565 | if (InventoryService.PurgeFolder(folder)) | 565 | if (InventoryService.PurgeFolder(folder)) |
566 | m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID); | 566 | m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID); |