* Implement full grid mode Trash empty

* Now, emptying the trash should remove folders and the items they contain as well as items which were not in a subfolder.
* This will only work once both the region and grid servers have reached this revision.
* You may also need to clear your cache before this will work
* Refactoring to follow.
This commit is contained in:
Justin Clarke Casey
2008-04-23 22:13:57 +00:00
parent e108133d91
commit 40176c12f9
5 changed files with 62 additions and 26 deletions

View File

@@ -523,14 +523,7 @@ namespace OpenSim.Framework.Communications.Cache
purgedBaseFolder.Type = purgedFolder.Type;
purgedBaseFolder.Version = purgedFolder.Version;
m_commsManager.InventoryService.PurgeInventoryFolder(remoteClient.AgentId, purgedBaseFolder);
// XXX Remains temporarily so that we still delete items in the grid case.
List<InventoryItemBase> items = purgedFolder.RequestListOfItems();
foreach (InventoryItemBase item in items)
{
userProfile.DeleteItem(remoteClient.AgentId, item);
}
m_commsManager.InventoryService.PurgeInventoryFolder(remoteClient.AgentId, purgedBaseFolder);
purgedFolder.Purge();
}

View File

@@ -259,13 +259,12 @@ namespace OpenSim.Framework.Communications
}
}
// XXX Temporarily don't delete the items since UserProfileCacheService is still doing this
// List<InventoryItemBase> items = RequestFolderItems(folder.ID);
//
// foreach (InventoryItemBase item : items)
// {
// DeleteItem(item);
// }
List<InventoryItemBase> items = RequestFolderItems(folder.ID);
foreach (InventoryItemBase item in items)
{
DeleteItem(item);
}
}
private void AddNewInventorySet(UsersInventory inventory)