aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie2010-04-30 11:48:57 +0100
committerMelanie2010-04-30 11:48:57 +0100
commit8b70477556a5467868bf6b771da8bb5a366f3160 (patch)
treef44e1e120072848270abc38e9eee374b2d5792c0 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentFix Av jump motion S/W (diff)
parentFix link security issue (diff)
downloadopensim-SC-8b70477556a5467868bf6b771da8bb5a366f3160.zip
opensim-SC-8b70477556a5467868bf6b771da8bb5a366f3160.tar.gz
opensim-SC-8b70477556a5467868bf6b771da8bb5a366f3160.tar.bz2
opensim-SC-8b70477556a5467868bf6b771da8bb5a366f3160.tar.xz
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 6c57d18..a430bc4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2577,5 +2577,55 @@ namespace OpenSim.Region.Framework.Scenes
2577 part.GetProperties(remoteClient); 2577 part.GetProperties(remoteClient);
2578 } 2578 }
2579 } 2579 }
2580
2581 public void DelinkObjects(List<uint> primIds, IClientAPI client)
2582 {
2583 List<SceneObjectPart> parts = new List<SceneObjectPart>();
2584
2585 foreach (uint localID in primIds)
2586 {
2587 SceneObjectPart part = GetSceneObjectPart(localID);
2588
2589 if (part == null)
2590 continue;
2591
2592 if (Permissions.CanDelinkObject(client.AgentId, part.ParentGroup.RootPart.UUID))
2593 parts.Add(part);
2594 }
2595
2596 m_sceneGraph.DelinkObjects(parts);
2597 }
2598
2599 public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds)
2600 {
2601 List<UUID> owners = new List<UUID>();
2602
2603 List<SceneObjectPart> children = new List<SceneObjectPart>();
2604 SceneObjectPart root = GetSceneObjectPart(parentPrimId);
2605
2606 if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID))
2607 return;
2608
2609 foreach (uint localID in childPrimIds)
2610 {
2611 SceneObjectPart part = GetSceneObjectPart(localID);
2612
2613 if (part == null)
2614 continue;
2615
2616 if (!owners.Contains(part.OwnerID))
2617 owners.Add(part.OwnerID);
2618
2619 if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID))
2620 children.Add(part);
2621 }
2622
2623 // Must be all one owner
2624 //
2625 if (owners.Count > 1)
2626 return;
2627
2628 m_sceneGraph.LinkObjects(root, children);
2629 }
2580 } 2630 }
2581} 2631}