diff options
author | Melanie | 2010-10-06 19:59:30 +0200 |
---|---|---|
committer | Melanie | 2010-10-06 20:00:51 +0100 |
commit | abfede7819e470c4a9d135b529c40d19fb94dca5 (patch) | |
tree | 7b197e56104bc10d4764fb45ab5f24e9a97a4282 /OpenSim/Region/CoreModules | |
parent | Add and plumb the usetex URL parameter to worldview. Required but not yet (diff) | |
download | opensim-SC-abfede7819e470c4a9d135b529c40d19fb94dca5.zip opensim-SC-abfede7819e470c4a9d135b529c40d19fb94dca5.tar.gz opensim-SC-abfede7819e470c4a9d135b529c40d19fb94dca5.tar.bz2 opensim-SC-abfede7819e470c4a9d135b529c40d19fb94dca5.tar.xz |
Plumb the path for multiple object deletes
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index c1d6cd3..d05cfc2 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -196,13 +196,24 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
196 | // currently calls this with multiple items. | 196 | // currently calls this with multiple items. |
197 | UUID ret = UUID.Zero; | 197 | UUID ret = UUID.Zero; |
198 | 198 | ||
199 | Dictionary<UUID, List<SceneObjectGroup>> deletes = | ||
200 | new Dictionary<UUID, List<SceneObjectGroup>>(); | ||
201 | |||
199 | foreach (SceneObjectGroup g in objectGroups) | 202 | foreach (SceneObjectGroup g in objectGroups) |
200 | ret = DeleteToInventory(action, folderID, g, remoteClient); | 203 | { |
204 | if (!deletes.ContainsKey(g.OwnerID)) | ||
205 | deletes[g.OwnerID] = new List<SceneObjectGroup>(); | ||
206 | |||
207 | deletes[g.OwnerID].Add(g); | ||
208 | } | ||
209 | |||
210 | foreach (List<SceneObjectGroup> objlist in deletes.Values) | ||
211 | ret = DeleteToInventory(action, folderID, objlist, remoteClient); | ||
201 | 212 | ||
202 | return ret; | 213 | return ret; |
203 | } | 214 | } |
204 | 215 | ||
205 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, | 216 | private UUID DeleteToInventory(DeRezAction action, UUID folderID, |
206 | SceneObjectGroup objectGroup, IClientAPI remoteClient) | 217 | SceneObjectGroup objectGroup, IClientAPI remoteClient) |
207 | { | 218 | { |
208 | UUID assetID = UUID.Zero; | 219 | UUID assetID = UUID.Zero; |
@@ -315,10 +326,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
315 | } | 326 | } |
316 | else | 327 | else |
317 | { | 328 | { |
318 | // Catch all. Use lost & found | 329 | if (remoteClient == null || |
319 | // | 330 | objectGroup.OwnerID != remoteClient.AgentId) |
331 | { | ||
332 | // Taking copy of another person's item. Take to | ||
333 | // Objects folder. | ||
334 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object); | ||
335 | } | ||
336 | else | ||
337 | { | ||
338 | // Catch all. Use lost & found | ||
339 | // | ||
320 | 340 | ||
321 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); | 341 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); |
342 | } | ||
322 | } | 343 | } |
323 | } | 344 | } |
324 | 345 | ||