From 33cc847c4ac78b890f8ac175c479ab1b1c56cbbf Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 26 May 2014 15:19:20 +0300 Subject: When saving an OAR in "Publish" mode, also discard Group information --- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 85650d6..e68f954 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1343,7 +1343,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("SalePrice", sop.SalePrice.ToString()); writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); - WriteUUID(writer, "GroupID", sop.GroupID, options); + + UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.GroupID; + WriteUUID(writer, "GroupID", groupID, options); UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID; WriteUUID(writer, "OwnerID", ownerID, options); @@ -1469,7 +1471,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("Description", item.Description); writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString()); writer.WriteElementString("Flags", item.Flags.ToString()); - WriteUUID(writer, "GroupID", item.GroupID, options); + + UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.GroupID; + WriteUUID(writer, "GroupID", groupID, options); + writer.WriteElementString("GroupPermissions", item.GroupPermissions.ToString()); writer.WriteElementString("InvType", item.InvType.ToString()); WriteUUID(writer, "ItemID", item.ItemID, options); @@ -1490,7 +1495,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization WriteUUID(writer, "PermsGranter", item.PermsGranter, options); writer.WriteElementString("PermsMask", item.PermsMask.ToString()); writer.WriteElementString("Type", item.Type.ToString()); - writer.WriteElementString("OwnerChanged", item.OwnerChanged.ToString().ToLower()); + + bool ownerChanged = options.ContainsKey("wipe-owners") ? false : item.OwnerChanged; + writer.WriteElementString("OwnerChanged", ownerChanged.ToString().ToLower()); writer.WriteEndElement(); // TaskInventoryItem } -- cgit v1.1