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/CoreModules | |
parent | GetFolderItems implemented. It's not being called, but it might. (diff) | |
download | opensim-SC_OLD-c5af39239f7f2a1725d9c08bea80522de8835e0f.zip opensim-SC_OLD-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.gz opensim-SC_OLD-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.bz2 opensim-SC_OLD-c5af39239f7f2a1725d9c08bea80522de8835e0f.tar.xz |
A better purge of trash folder.
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 23 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 3a65336..5afbf68 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -267,7 +267,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
267 | item.Folder = trashFolder.ID; | 267 | item.Folder = trashFolder.ID; |
268 | 268 | ||
269 | // Diva comment: can't we just update this item??? | 269 | // Diva comment: can't we just update this item??? |
270 | invService.DeleteItem(item); | 270 | List<UUID> uuids = new List<UUID>(); |
271 | uuids.Add(item.ID); | ||
272 | invService.DeleteItems(item.Owner, uuids); | ||
271 | scene.AddInventoryItem(client, item); | 273 | scene.AddInventoryItem(client, item); |
272 | } | 274 | } |
273 | else | 275 | else |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs index ef5ffe1..d1ae3e4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs | |||
@@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
186 | /// </summary> | 186 | /// </summary> |
187 | /// <param name="item"></param> | 187 | /// <param name="item"></param> |
188 | /// <returns>true if the item was successfully deleted</returns> | 188 | /// <returns>true if the item was successfully deleted</returns> |
189 | public abstract bool DeleteItem(InventoryItemBase item); | 189 | public abstract bool DeleteItems(UUID ownerID, List<UUID> itemIDs); |
190 | 190 | ||
191 | public abstract InventoryItemBase GetItem(InventoryItemBase item); | 191 | public abstract InventoryItemBase GetItem(InventoryItemBase item); |
192 | 192 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 3649097..6a1f2d5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -393,18 +393,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
393 | } | 393 | } |
394 | } | 394 | } |
395 | 395 | ||
396 | public override bool DeleteItem(InventoryItemBase item) | 396 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) |
397 | { | 397 | { |
398 | if (item == null) | 398 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID); |
399 | |||
400 | if (itemIDs == null) | ||
399 | return false; | 401 | return false; |
402 | if (itemIDs.Count == 0) | ||
403 | return true; | ||
400 | 404 | ||
401 | if (IsLocalGridUser(item.Owner)) | 405 | if (IsLocalGridUser(ownerID)) |
402 | return m_GridService.DeleteItem(item); | 406 | return m_GridService.DeleteItems(ownerID, itemIDs); |
403 | else | 407 | else |
404 | { | 408 | { |
405 | UUID sessionID = GetSessionID(item.Owner); | 409 | UUID sessionID = GetSessionID(ownerID); |
406 | string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); | 410 | string uri = GetUserInventoryURI(ownerID) + "/" + ownerID.ToString(); |
407 | return m_HGService.DeleteItem(uri, item, sessionID); | 411 | return m_HGService.DeleteItems(uri, itemIDs, sessionID); |
408 | } | 412 | } |
409 | } | 413 | } |
410 | 414 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 2fbc5fe..b2640af 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -294,9 +294,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
294 | /// </summary> | 294 | /// </summary> |
295 | /// <param name="item"></param> | 295 | /// <param name="item"></param> |
296 | /// <returns>true if the item was successfully deleted</returns> | 296 | /// <returns>true if the item was successfully deleted</returns> |
297 | public override bool DeleteItem(InventoryItemBase item) | 297 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) |
298 | { | 298 | { |
299 | return m_InventoryService.DeleteItem(item); | 299 | return m_InventoryService.DeleteItems(ownerID, itemIDs); |
300 | } | 300 | } |
301 | 301 | ||
302 | public override InventoryItemBase GetItem(InventoryItemBase item) | 302 | public override InventoryItemBase GetItem(InventoryItemBase item) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 522f680..012f0e3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -273,13 +273,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
273 | return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID); | 273 | return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID); |
274 | } | 274 | } |
275 | 275 | ||
276 | public override bool DeleteItem(InventoryItemBase item) | 276 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) |
277 | { | 277 | { |
278 | if (item == null) | 278 | if (itemIDs == null) |
279 | return false; | 279 | return false; |
280 | if (itemIDs.Count == 0) | ||
281 | return true; | ||
280 | 282 | ||
281 | UUID sessionID = GetSessionID(item.Owner); | 283 | UUID sessionID = GetSessionID(ownerID); |
282 | return m_RemoteConnector.DeleteItem(item.Owner.ToString(), item, sessionID); | 284 | return m_RemoteConnector.DeleteItems(ownerID.ToString(), itemIDs, sessionID); |
283 | } | 285 | } |
284 | 286 | ||
285 | public override InventoryItemBase GetItem(InventoryItemBase item) | 287 | public override InventoryItemBase GetItem(InventoryItemBase item) |