diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 32d941c..bf7f5c1 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -147,6 +147,23 @@ namespace OpenSim.Framework.Communications.Cache | |||
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID) | ||
151 | { | ||
152 | CachedUserInfo userProfile; | ||
153 | |||
154 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | ||
155 | { | ||
156 | if (userProfile.RootFolder != null) | ||
157 | { | ||
158 | InventoryFolderBase baseFolder = new InventoryFolderBase(); | ||
159 | baseFolder.agentID = remoteClient.AgentId; | ||
160 | baseFolder.folderID = folderID; | ||
161 | baseFolder.parentID = parentID; | ||
162 | m_parent.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder); | ||
163 | } | ||
164 | } | ||
165 | } | ||
166 | |||
150 | /// <summary> | 167 | /// <summary> |
151 | /// Tell the client about the various child items and folders contained in the requested folder. | 168 | /// Tell the client about the various child items and folders contained in the requested folder. |
152 | /// </summary> | 169 | /// </summary> |
@@ -163,14 +180,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
163 | if (folderID == libraryRoot.folderID) | 180 | if (folderID == libraryRoot.folderID) |
164 | { | 181 | { |
165 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, | 182 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, |
166 | libraryRoot.RequestListOfItems(), libraryRoot.SubFoldersCount); | 183 | libraryRoot.RequestListOfItems(), libraryRoot.RequestListOfFolders(), libraryRoot.SubFoldersCount); |
167 | 184 | ||
168 | return; | 185 | return; |
169 | } | 186 | } |
170 | 187 | ||
171 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) | 188 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) |
172 | { | 189 | { |
173 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems(), fold.SubFoldersCount); | 190 | System.Console.WriteLine("fetching librarysubfolder"); |
191 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems(), fold.RequestListOfFolders(), fold.SubFoldersCount); | ||
174 | 192 | ||
175 | return; | 193 | return; |
176 | } | 194 | } |
@@ -182,19 +200,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
182 | { | 200 | { |
183 | if (userProfile.RootFolder.folderID == folderID) | 201 | if (userProfile.RootFolder.folderID == folderID) |
184 | { | 202 | { |
203 | System.Console.Write("fetching root folder"); | ||
185 | if (fetchItems) | 204 | if (fetchItems) |
186 | { | 205 | { |
187 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, | 206 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, |
188 | userProfile.RootFolder.RequestListOfItems(), userProfile.RootFolder.SubFoldersCount); | 207 | userProfile.RootFolder.RequestListOfItems(), userProfile.RootFolder.RequestListOfFolders(), userProfile.RootFolder.SubFoldersCount); |
189 | } | 208 | } |
190 | } | 209 | } |
191 | else | 210 | else |
192 | { | 211 | { |
193 | InventoryFolderImpl folder = userProfile.RootFolder.HasSubFolder(folderID); | 212 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) |
194 | |||
195 | if (fetchItems && folder != null) | ||
196 | { | 213 | { |
197 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, folder.RequestListOfItems(), folder.SubFoldersCount); | 214 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, fold.RequestListOfItems(), fold.RequestListOfFolders(), fold.SubFoldersCount); |
215 | return; | ||
198 | } | 216 | } |
199 | } | 217 | } |
200 | } | 218 | } |