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/Services/InventoryService/InventoryService.cs | |
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/Services/InventoryService/InventoryService.cs')
-rw-r--r-- | OpenSim/Services/InventoryService/InventoryService.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 65c2d96..69b1b28 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -387,12 +387,14 @@ namespace OpenSim.Services.InventoryService | |||
387 | } | 387 | } |
388 | 388 | ||
389 | // See IInventoryServices | 389 | // See IInventoryServices |
390 | public virtual bool DeleteItem(InventoryItemBase item) | 390 | public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs) |
391 | { | 391 | { |
392 | m_log.InfoFormat( | 392 | m_log.InfoFormat( |
393 | "[INVENTORY SERVICE]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); | 393 | "[INVENTORY SERVICE]: Deleting {0} items from user {1}", itemIDs.Count, owner); |
394 | 394 | ||
395 | m_Database.deleteInventoryItem(item.ID); | 395 | // uhh..... |
396 | foreach (UUID uuid in itemIDs) | ||
397 | m_Database.deleteInventoryItem(uuid); | ||
396 | 398 | ||
397 | // FIXME: Should return false on failure | 399 | // FIXME: Should return false on failure |
398 | return true; | 400 | return true; |
@@ -439,10 +441,12 @@ namespace OpenSim.Services.InventoryService | |||
439 | 441 | ||
440 | List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID); | 442 | List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID); |
441 | 443 | ||
444 | List<UUID> uuids = new List<UUID>(); | ||
442 | foreach (InventoryItemBase item in items) | 445 | foreach (InventoryItemBase item in items) |
443 | { | 446 | { |
444 | DeleteItem(item); | 447 | uuids.Add(item.ID); |
445 | } | 448 | } |
449 | DeleteItems(folder.Owner, uuids); | ||
446 | 450 | ||
447 | // FIXME: Should return false on failure | 451 | // FIXME: Should return false on failure |
448 | return true; | 452 | return true; |