aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorBrian McBee2007-12-08 20:41:37 +0000
committerBrian McBee2007-12-08 20:41:37 +0000
commit383eccc543e402710bb48802c6951b94d185a6a8 (patch)
tree17b1730a5e6bc3783d54e3cf0166da2196f8a9a5 /OpenSim/Framework/Communications/Cache
parentAllow moving, deleting, and restoring objects in inventory. (diff)
downloadopensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.zip
opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.gz
opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.bz2
opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs22
1 files changed, 21 insertions, 1 deletions
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
136 /// <param name="fetchFolders"></param> 136 /// <param name="fetchFolders"></param>
137 /// <param name="fetchItems"></param> 137 /// <param name="fetchItems"></param>
138 /// <param name="sortOrder"></param> 138 /// <param name="sortOrder"></param>
139 public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, 139 public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID,
140 bool fetchFolders, bool fetchItems, int sortOrder) 140 bool fetchFolders, bool fetchItems, int sortOrder)
141 { 141 {
142 InventoryFolderImpl fold = null; 142 InventoryFolderImpl fold = null;
@@ -181,6 +181,26 @@ namespace OpenSim.Framework.Communications.Cache
181 } 181 }
182 } 182 }
183 183
184 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
185 {
186 CachedUserInfo userProfile;
187 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
188 {
189 if (userProfile.RootFolder != null)
190 {
191 InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID);
192 if (subFolder != null)
193 {
194 List<InventoryItemBase> items=subFolder.RequestListOfItems();
195 foreach(InventoryItemBase item in items)
196 {
197 userProfile.DeleteItem(remoteClient.AgentId, item);
198 }
199 }
200 }
201 }
202 }
203
184 public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) 204 public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
185 { 205 {
186 if (ownerID == libraryRoot.agentID) 206 if (ownerID == libraryRoot.agentID)