diff options
Diffstat (limited to 'OpenSim')
17 files changed, 150 insertions, 31 deletions
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 6f86704..57a908e 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -532,6 +532,11 @@ namespace OpenSim.Framework.Communications.Tests | |||
532 | return false; | 532 | return false; |
533 | } | 533 | } |
534 | 534 | ||
535 | public bool DeleteFolders(UUID ownerID, List<UUID> ids) | ||
536 | { | ||
537 | return false; | ||
538 | } | ||
539 | |||
535 | public bool PurgeFolder(InventoryFolderBase folder) | 540 | public bool PurgeFolder(InventoryFolderBase folder) |
536 | { | 541 | { |
537 | return false; | 542 | return false; |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c6cdcaa..444adf9 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -260,7 +260,7 @@ namespace OpenSim.Framework | |||
260 | IClientAPI remoteClient, List<UUID> itemIDs); | 260 | IClientAPI remoteClient, List<UUID> itemIDs); |
261 | 261 | ||
262 | public delegate void RemoveInventoryFolder( | 262 | public delegate void RemoveInventoryFolder( |
263 | IClientAPI remoteClient, UUID folderID); | 263 | IClientAPI remoteClient, List<UUID> folderIDs); |
264 | 264 | ||
265 | public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest); | 265 | public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest); |
266 | 266 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a7a5aa3..dd01780 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -7090,14 +7090,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7090 | if (OnRemoveInventoryFolder != null) | 7090 | if (OnRemoveInventoryFolder != null) |
7091 | { | 7091 | { |
7092 | handlerRemoveInventoryFolder = null; | 7092 | handlerRemoveInventoryFolder = null; |
7093 | List<UUID> uuids = new List<UUID>(); | ||
7093 | foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) | 7094 | foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) |
7094 | { | 7095 | { |
7095 | handlerRemoveInventoryFolder = OnRemoveInventoryFolder; | 7096 | uuids.Add(datablock.FolderID); |
7096 | 7097 | } | |
7097 | if (handlerRemoveInventoryFolder != null) | 7098 | handlerRemoveInventoryFolder = OnRemoveInventoryFolder; |
7098 | { | 7099 | if (handlerRemoveInventoryFolder != null) |
7099 | handlerRemoveInventoryFolder(this, datablock.FolderID); | 7100 | { |
7100 | } | 7101 | handlerRemoveInventoryFolder(this, uuids); |
7101 | } | 7102 | } |
7102 | } | 7103 | } |
7103 | break; | 7104 | break; |
@@ -7114,14 +7115,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7114 | if (OnRemoveInventoryFolder != null) | 7115 | if (OnRemoveInventoryFolder != null) |
7115 | { | 7116 | { |
7116 | handlerRemoveInventoryFolder = null; | 7117 | handlerRemoveInventoryFolder = null; |
7118 | List<UUID> uuids = new List<UUID>(); | ||
7117 | foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData) | 7119 | foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData) |
7118 | { | 7120 | { |
7119 | handlerRemoveInventoryFolder = OnRemoveInventoryFolder; | 7121 | uuids.Add(datablock.FolderID); |
7120 | 7122 | } | |
7121 | if (handlerRemoveInventoryFolder != null) | 7123 | handlerRemoveInventoryFolder = OnRemoveInventoryFolder; |
7122 | { | 7124 | if (handlerRemoveInventoryFolder != null) |
7123 | handlerRemoveInventoryFolder(this, datablock.FolderID); | 7125 | { |
7124 | } | 7126 | handlerRemoveInventoryFolder(this, uuids); |
7125 | } | 7127 | } |
7126 | } | 7128 | } |
7127 | 7129 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs index d4cb616..bd32f3b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs | |||
@@ -139,6 +139,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
139 | public abstract bool MoveFolder(InventoryFolderBase folder); | 139 | public abstract bool MoveFolder(InventoryFolderBase folder); |
140 | 140 | ||
141 | /// <summary> | 141 | /// <summary> |
142 | /// Delete a list of inventory folders (from trash) | ||
143 | /// </summary> | ||
144 | public abstract bool DeleteFolders(UUID ownerID, List<UUID> folderIDs); | ||
145 | |||
146 | /// <summary> | ||
142 | /// Purge an inventory folder of all its items and subfolders. | 147 | /// Purge an inventory folder of all its items and subfolders. |
143 | /// </summary> | 148 | /// </summary> |
144 | /// <param name="folder"></param> | 149 | /// <param name="folder"></param> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 787c6c8..1c66254 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -330,6 +330,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
330 | } | 330 | } |
331 | } | 331 | } |
332 | 332 | ||
333 | public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
334 | { | ||
335 | if (folderIDs == null) | ||
336 | return false; | ||
337 | if (folderIDs.Count == 0) | ||
338 | return false; | ||
339 | |||
340 | if (IsLocalGridUser(ownerID)) | ||
341 | return m_GridService.DeleteFolders(ownerID, folderIDs); | ||
342 | else | ||
343 | { | ||
344 | UUID sessionID = GetSessionID(ownerID); | ||
345 | string uri = GetUserInventoryURI(ownerID) + "/" + ownerID.ToString(); | ||
346 | return m_HGService.DeleteFolders(uri, folderIDs, sessionID); | ||
347 | } | ||
348 | } | ||
349 | |||
333 | public override bool MoveFolder(InventoryFolderBase folder) | 350 | public override bool MoveFolder(InventoryFolderBase folder) |
334 | { | 351 | { |
335 | if (folder == null) | 352 | if (folder == null) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index e6edcf2..66d11dd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -258,6 +258,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
258 | return m_InventoryService.MoveFolder(folder); | 258 | return m_InventoryService.MoveFolder(folder); |
259 | } | 259 | } |
260 | 260 | ||
261 | public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
262 | { | ||
263 | return m_InventoryService.DeleteFolders(ownerID, folderIDs); | ||
264 | } | ||
265 | |||
261 | /// <summary> | 266 | /// <summary> |
262 | /// Purge an inventory folder of all its items and subfolders. | 267 | /// Purge an inventory folder of all its items and subfolders. |
263 | /// </summary> | 268 | /// </summary> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 201442c..0d32c77 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -243,6 +243,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
243 | return m_RemoteConnector.MoveFolder(folder.Owner.ToString(), folder, sessionID); | 243 | return m_RemoteConnector.MoveFolder(folder.Owner.ToString(), folder, sessionID); |
244 | } | 244 | } |
245 | 245 | ||
246 | public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
247 | { | ||
248 | if (folderIDs == null) | ||
249 | return false; | ||
250 | if (folderIDs.Count == 0) | ||
251 | return false; | ||
252 | |||
253 | UUID sessionID = GetSessionID(ownerID); | ||
254 | return m_RemoteConnector.DeleteFolders(ownerID.ToString(), folderIDs, sessionID); | ||
255 | } | ||
256 | |||
257 | |||
246 | public override bool PurgeFolder(InventoryFolderBase folder) | 258 | public override bool PurgeFolder(InventoryFolderBase folder) |
247 | { | 259 | { |
248 | if (folder == null) | 260 | if (folder == null) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index a9d361b..3301536 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -789,23 +789,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
789 | } | 789 | } |
790 | 790 | ||
791 | /// <summary> | 791 | /// <summary> |
792 | /// Removes an inventory folder. Although there is a packet in the Linden protocol for this, it may be | 792 | /// Removes an inventory folder. This packet is sent when the user |
793 | /// legacy and not currently used (purge folder is used to remove folders from trash instead). | 793 | /// right-clicks a folder that's already in trash and chooses "purge" |
794 | /// </summary> | 794 | /// </summary> |
795 | /// <param name="remoteClient"></param> | 795 | /// <param name="remoteClient"></param> |
796 | /// <param name="folderID"></param> | 796 | /// <param name="folderID"></param> |
797 | private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID) | 797 | private void RemoveInventoryFolder(IClientAPI remoteClient, List<UUID> folderIDs) |
798 | { | 798 | { |
799 | // Unclear is this handler is ever called by the Linden client, but it might | 799 | m_log.DebugFormat("[SCENE INVENTORY]: RemoveInventoryFolders count {0}", folderIDs.Count); |
800 | 800 | InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); | |
801 | InventoryFolderBase folder = new InventoryFolderBase(folderID); | ||
802 | folder.Owner = remoteClient.AgentId; | ||
803 | InventoryFolderBase trash = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); | ||
804 | if (trash != null) | ||
805 | { | ||
806 | folder.ParentID = trash.ID; | ||
807 | InventoryService.MoveFolder(folder); | ||
808 | } | ||
809 | } | 801 | } |
810 | 802 | ||
811 | private SceneObjectGroup GetGroupByPrim(uint localID) | 803 | private SceneObjectGroup GetGroupByPrim(uint localID) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 2b815a2..d3e414f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
552 | 552 | ||
553 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) | 553 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) |
554 | { | 554 | { |
555 | InventoryFolderBase folder = new InventoryFolderBase(folderID); | 555 | InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId); |
556 | folder = InventoryService.GetFolder(folder); | 556 | folder = InventoryService.GetFolder(folder); |
557 | if (folder != null) | 557 | if (folder != null) |
558 | { | 558 | { |
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs index 10336b0..998b322 100644 --- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs | |||
@@ -106,6 +106,10 @@ namespace OpenSim.Server.Handlers.Inventory | |||
106 | 106 | ||
107 | m_httpServer.AddStreamHandler( | 107 | m_httpServer.AddStreamHandler( |
108 | new RestDeserialiseSecureHandler<List<Guid>, bool>( | 108 | new RestDeserialiseSecureHandler<List<Guid>, bool>( |
109 | "POST", "/DeleteFolders/", DeleteFolders, CheckAuthSession)); | ||
110 | |||
111 | m_httpServer.AddStreamHandler( | ||
112 | new RestDeserialiseSecureHandler<List<Guid>, bool>( | ||
109 | "POST", "/DeleteItem/", DeleteItems, CheckAuthSession)); | 113 | "POST", "/DeleteItem/", DeleteItems, CheckAuthSession)); |
110 | 114 | ||
111 | m_httpServer.AddStreamHandler( | 115 | m_httpServer.AddStreamHandler( |
@@ -254,6 +258,15 @@ namespace OpenSim.Server.Handlers.Inventory | |||
254 | return m_InventoryService.GetAssetPermissions(item.Owner, item.AssetID); | 258 | return m_InventoryService.GetAssetPermissions(item.Owner, item.AssetID); |
255 | } | 259 | } |
256 | 260 | ||
261 | public bool DeleteFolders(List<Guid> items) | ||
262 | { | ||
263 | List<UUID> uuids = new List<UUID>(); | ||
264 | foreach (Guid g in items) | ||
265 | uuids.Add(new UUID(g)); | ||
266 | // oops we lost the user info here. Bad bad handlers | ||
267 | return m_InventoryService.DeleteFolders(UUID.Zero, uuids); | ||
268 | } | ||
269 | |||
257 | public bool DeleteItems(List<Guid> items) | 270 | public bool DeleteItems(List<Guid> items) |
258 | { | 271 | { |
259 | List<UUID> uuids = new List<UUID>(); | 272 | List<UUID> uuids = new List<UUID>(); |
diff --git a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs index 45e921a..1004fb9 100644 --- a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs | |||
@@ -201,6 +201,19 @@ namespace OpenSim.Services.Connectors.Inventory | |||
201 | return false; | 201 | return false; |
202 | } | 202 | } |
203 | 203 | ||
204 | public bool DeleteFolders(string id, List<UUID> folders, UUID sessionID) | ||
205 | { | ||
206 | string url = string.Empty; | ||
207 | string userID = string.Empty; | ||
208 | |||
209 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
210 | { | ||
211 | ISessionAuthInventoryService connector = GetConnector(url); | ||
212 | return connector.DeleteFolders(userID, folders, sessionID); | ||
213 | } | ||
214 | return false; | ||
215 | } | ||
216 | |||
204 | public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) | 217 | public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) |
205 | { | 218 | { |
206 | string url = string.Empty; | 219 | string url = string.Empty; |
diff --git a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs index c89c9b7..da8c7e2 100644 --- a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs +++ b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs | |||
@@ -89,6 +89,11 @@ namespace OpenSim.Services.Connectors | |||
89 | bool MoveFolder(string userID, InventoryFolderBase folder, UUID session_id); | 89 | bool MoveFolder(string userID, InventoryFolderBase folder, UUID session_id); |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
92 | /// Delete a list of inventory folders (from trash) | ||
93 | /// </summary> | ||
94 | bool DeleteFolders(string userID, List<UUID> folders, UUID session_id); | ||
95 | |||
96 | /// <summary> | ||
92 | /// Purge an inventory folder of all its items and subfolders. | 97 | /// Purge an inventory folder of all its items and subfolders. |
93 | /// </summary> | 98 | /// </summary> |
94 | /// <param name="folder"></param> | 99 | /// <param name="folder"></param> |
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index 7c35bde..423ca75 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -308,6 +308,25 @@ namespace OpenSim.Services.Connectors | |||
308 | return false; | 308 | return false; |
309 | } | 309 | } |
310 | 310 | ||
311 | public bool DeleteFolders(string userID, List<UUID> folderIDs, UUID sessionID) | ||
312 | { | ||
313 | try | ||
314 | { | ||
315 | List<Guid> guids = new List<Guid>(); | ||
316 | foreach (UUID u in folderIDs) | ||
317 | guids.Add(u.Guid); | ||
318 | return SynchronousRestSessionObjectPoster<List<Guid>, bool>.BeginPostObject( | ||
319 | "POST", m_ServerURI + "/DeleteFolders/", guids, sessionID.ToString(), userID); | ||
320 | } | ||
321 | catch (Exception e) | ||
322 | { | ||
323 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Delete inventory folders operation failed, {0} {1}", | ||
324 | e.Source, e.Message); | ||
325 | } | ||
326 | |||
327 | return false; | ||
328 | } | ||
329 | |||
311 | public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 330 | public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) |
312 | { | 331 | { |
313 | try | 332 | try |
@@ -481,12 +500,12 @@ namespace OpenSim.Services.Connectors | |||
481 | return null; | 500 | return null; |
482 | } | 501 | } |
483 | 502 | ||
484 | public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase item, UUID sessionID) | 503 | public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase folder, UUID sessionID) |
485 | { | 504 | { |
486 | try | 505 | try |
487 | { | 506 | { |
488 | return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject( | 507 | return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject( |
489 | "POST", m_ServerURI + "/QueryFolder/", item, sessionID.ToString(), item.Owner.ToString()); | 508 | "POST", m_ServerURI + "/QueryFolder/", folder, sessionID.ToString(), userID); |
490 | } | 509 | } |
491 | catch (Exception e) | 510 | catch (Exception e) |
492 | { | 511 | { |
diff --git a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs index cd283ff..a7aa138 100644 --- a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs | |||
@@ -136,6 +136,12 @@ namespace OpenSim.Services.Connectors | |||
136 | return false; | 136 | return false; |
137 | } | 137 | } |
138 | 138 | ||
139 | public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
140 | { | ||
141 | return false; | ||
142 | } | ||
143 | |||
144 | |||
139 | public bool PurgeFolder(InventoryFolderBase folder) | 145 | public bool PurgeFolder(InventoryFolderBase folder) |
140 | { | 146 | { |
141 | return false; | 147 | return false; |
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index ebdb09a..c775090 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs | |||
@@ -122,6 +122,14 @@ namespace OpenSim.Services.Interfaces | |||
122 | bool MoveFolder(InventoryFolderBase folder); | 122 | bool MoveFolder(InventoryFolderBase folder); |
123 | 123 | ||
124 | /// <summary> | 124 | /// <summary> |
125 | /// Delete an item from the user's inventory | ||
126 | /// </summary> | ||
127 | /// <param name="item"></param> | ||
128 | /// <returns>true if the item was successfully deleted</returns> | ||
129 | //bool DeleteItem(InventoryItemBase item); | ||
130 | bool DeleteFolders(UUID userID, List<UUID> folderIDs); | ||
131 | |||
132 | /// <summary> | ||
125 | /// Purge an inventory folder of all its items and subfolders. | 133 | /// Purge an inventory folder of all its items and subfolders. |
126 | /// </summary> | 134 | /// </summary> |
127 | /// <param name="folder"></param> | 135 | /// <param name="folder"></param> |
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 45bbd37..0cf4af1 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -425,15 +425,27 @@ namespace OpenSim.Services.InventoryService | |||
425 | return null; | 425 | return null; |
426 | } | 426 | } |
427 | 427 | ||
428 | public virtual InventoryFolderBase GetFolder(InventoryFolderBase item) | 428 | public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) |
429 | { | 429 | { |
430 | InventoryFolderBase result = m_Database.getInventoryFolder(item.ID); | 430 | m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder {0}", folder.ID); |
431 | InventoryFolderBase result = m_Database.getInventoryFolder(folder.ID); | ||
431 | if (result != null) | 432 | if (result != null) |
432 | return result; | 433 | return result; |
433 | 434 | ||
434 | return null; | 435 | return null; |
435 | } | 436 | } |
436 | 437 | ||
438 | public virtual bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
439 | { | ||
440 | foreach (UUID id in folderIDs) | ||
441 | { | ||
442 | InventoryFolderBase folder = new InventoryFolderBase(id, ownerID); | ||
443 | PurgeFolder(folder); | ||
444 | m_Database.deleteInventoryFolder(id); | ||
445 | } | ||
446 | return true; | ||
447 | } | ||
448 | |||
437 | /// <summary> | 449 | /// <summary> |
438 | /// Purge a folder of all items items and subfolders. | 450 | /// Purge a folder of all items items and subfolders. |
439 | /// | 451 | /// |
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs index ee22e5e..5a0ee7c 100644 --- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs +++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs | |||
@@ -128,6 +128,11 @@ namespace OpenSim.Tests.Common.Mock | |||
128 | return false; | 128 | return false; |
129 | } | 129 | } |
130 | 130 | ||
131 | public bool DeleteFolders(UUID ownerID, List<UUID> ids) | ||
132 | { | ||
133 | return false; | ||
134 | } | ||
135 | |||
131 | public bool PurgeFolder(InventoryFolderBase folder) | 136 | public bool PurgeFolder(InventoryFolderBase folder) |
132 | { | 137 | { |
133 | return false; | 138 | return false; |