From 383eccc543e402710bb48802c6951b94d185a6a8 Mon Sep 17 00:00:00 2001
From: Brian McBee
Date: Sat, 8 Dec 2007 20:41:37 +0000
Subject: hackish code to allow emptying of trash. This really should be done
on the inventory server, and not from the region. Also: it appeared to work
the first try, so I have probably done something horribly wrong.
---
.../Cache/UserProfileCacheService.cs | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index fb4c3a6..342bb0d 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID,
+ public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder)
{
InventoryFolderImpl fold = null;
@@ -181,6 +181,26 @@ namespace OpenSim.Framework.Communications.Cache
}
}
+ public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
+ {
+ CachedUserInfo userProfile;
+ if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
+ {
+ if (userProfile.RootFolder != null)
+ {
+ InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID);
+ if (subFolder != null)
+ {
+ List items=subFolder.RequestListOfItems();
+ foreach(InventoryItemBase item in items)
+ {
+ userProfile.DeleteItem(remoteClient.AgentId, item);
+ }
+ }
+ }
+ }
+ }
+
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
{
if (ownerID == libraryRoot.agentID)
--
cgit v1.1