From 40176c12f94044527e82972cbb72cce8caa5ce2b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 23 Apr 2008 22:13:57 +0000 Subject: * 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. --- .../Communications/Cache/UserProfileCacheService.cs | 9 +-------- OpenSim/Framework/Communications/InventoryServiceBase.cs | 13 ++++++------- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 61ec483..1e3dbb6 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -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 items = purgedFolder.RequestListOfItems(); - foreach (InventoryItemBase item in items) - { - userProfile.DeleteItem(remoteClient.AgentId, item); - } + m_commsManager.InventoryService.PurgeInventoryFolder(remoteClient.AgentId, purgedBaseFolder); purgedFolder.Purge(); } diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 5cbfcf9..0528b91 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -259,13 +259,12 @@ namespace OpenSim.Framework.Communications } } - // XXX Temporarily don't delete the items since UserProfileCacheService is still doing this -// List items = RequestFolderItems(folder.ID); -// -// foreach (InventoryItemBase item : items) -// { -// DeleteItem(item); -// } + List items = RequestFolderItems(folder.ID); + + foreach (InventoryItemBase item in items) + { + DeleteItem(item); + } } private void AddNewInventorySet(UsersInventory inventory) -- cgit v1.1