diff options
author | Diva Canto | 2009-08-19 10:56:08 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-19 10:56:08 -0700 |
commit | d519f1885f587409592cf92bc0f4ba8533a1866f (patch) | |
tree | dc8d0073d09050c8787121290b1e3a8f65119812 /OpenSim/Services/InventoryService | |
parent | Async purge so that the client thread doesn't wait. (diff) | |
download | opensim-SC-d519f1885f587409592cf92bc0f4ba8533a1866f.zip opensim-SC-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.gz opensim-SC-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.bz2 opensim-SC-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.xz |
Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently).
Diffstat (limited to 'OpenSim/Services/InventoryService')
-rw-r--r-- | OpenSim/Services/InventoryService/InventoryService.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 69b1b28..e0217f6 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -386,6 +386,24 @@ namespace OpenSim.Services.InventoryService | |||
386 | return true; | 386 | return true; |
387 | } | 387 | } |
388 | 388 | ||
389 | public virtual bool MoveItems(UUID ownerID, List<InventoryItemBase> items) | ||
390 | { | ||
391 | m_log.InfoFormat( | ||
392 | "[INVENTORY SERVICE]: Moving {0} items from user {1}", items.Count, ownerID); | ||
393 | |||
394 | InventoryItemBase itm = null; | ||
395 | foreach (InventoryItemBase item in items) | ||
396 | { | ||
397 | itm = GetInventoryItem(item.ID); | ||
398 | itm.Folder = item.Folder; | ||
399 | if ((item.Name != null) && !item.Name.Equals(string.Empty)) | ||
400 | itm.Name = item.Name; | ||
401 | m_Database.updateInventoryItem(itm); | ||
402 | } | ||
403 | |||
404 | return true; | ||
405 | } | ||
406 | |||
389 | // See IInventoryServices | 407 | // See IInventoryServices |
390 | public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs) | 408 | public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs) |
391 | { | 409 | { |