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).

This commit is contained in:
Diva Canto
2009-08-19 10:56:08 -07:00
parent 4382f28efc
commit d519f1885f
16 changed files with 162 additions and 38 deletions

View File

@@ -386,6 +386,24 @@ namespace OpenSim.Services.InventoryService
return true;
}
public virtual bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{
m_log.InfoFormat(
"[INVENTORY SERVICE]: Moving {0} items from user {1}", items.Count, ownerID);
InventoryItemBase itm = null;
foreach (InventoryItemBase item in items)
{
itm = GetInventoryItem(item.ID);
itm.Folder = item.Folder;
if ((item.Name != null) && !item.Name.Equals(string.Empty))
itm.Name = item.Name;
m_Database.updateInventoryItem(itm);
}
return true;
}
// See IInventoryServices
public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs)
{