mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user