diff options
author | Diva Canto | 2009-08-22 10:24:26 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-22 10:24:26 -0700 |
commit | b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4 (patch) | |
tree | ac9eb8fc50943d35268cc56d67b1a3f38cf705b3 /OpenSim/Services/Connectors/Inventory | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4.zip opensim-SC_OLD-b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4.tar.gz opensim-SC_OLD-b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4.tar.bz2 opensim-SC_OLD-b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4.tar.xz |
* Fixes mantis http://opensimulator.org/mantis/view.php?id=4044. Turns out folders were never being removed from trash when they were singled out for purging in trash. They were being removed when Trash was purged as a whole. That behavior is now fixed for the new InventoryService set.
* Removed left-overs from AssetInventoryServer.
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory')
4 files changed, 45 insertions, 2 deletions
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; |