aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2014-05-26 08:14:34 -0700
committerDiva Canto2014-05-26 08:14:34 -0700
commitb778bd9423f0a26f231e88da7cb572ae4c33ba5a (patch)
tree34796ee627e3ac7b0828097b277e9172b03339c2 /OpenSim
parentAdds an optional redirect URL to the asset server handler for when assets are... (diff)
parentWhen saving an OAR in "Publish" mode, also discard Group information (diff)
downloadopensim-SC_OLD-b778bd9423f0a26f231e88da7cb572ae4c33ba5a.zip
opensim-SC_OLD-b778bd9423f0a26f231e88da7cb572ae4c33ba5a.tar.gz
opensim-SC_OLD-b778bd9423f0a26f231e88da7cb572ae4c33ba5a.tar.bz2
opensim-SC_OLD-b778bd9423f0a26f231e88da7cb572ae4c33ba5a.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs18
-rw-r--r--OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs13
4 files changed, 23 insertions, 14 deletions
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
index 709b516..4b5326a 100644
--- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
@@ -213,8 +213,13 @@ namespace OpenSim.Framework.Serialization.External
213 xtw.WriteElementString("ClaimDate", Convert.ToString(landData.ClaimDate)); 213 xtw.WriteElementString("ClaimDate", Convert.ToString(landData.ClaimDate));
214 xtw.WriteElementString("ClaimPrice", Convert.ToString(landData.ClaimPrice)); 214 xtw.WriteElementString("ClaimPrice", Convert.ToString(landData.ClaimPrice));
215 xtw.WriteElementString("GlobalID", landData.GlobalID.ToString()); 215 xtw.WriteElementString("GlobalID", landData.GlobalID.ToString());
216 xtw.WriteElementString("GroupID", landData.GroupID.ToString()); 216
217 xtw.WriteElementString("IsGroupOwned", Convert.ToString(landData.IsGroupOwned)); 217 UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : landData.GroupID;
218 xtw.WriteElementString("GroupID", groupID.ToString());
219
220 bool isGroupOwned = options.ContainsKey("wipe-owners") ? false : landData.IsGroupOwned;
221 xtw.WriteElementString("IsGroupOwned", Convert.ToString(isGroupOwned));
222
218 xtw.WriteElementString("Bitmap", Convert.ToBase64String(landData.Bitmap)); 223 xtw.WriteElementString("Bitmap", Convert.ToBase64String(landData.Bitmap));
219 xtw.WriteElementString("Description", landData.Description); 224 xtw.WriteElementString("Description", landData.Description);
220 xtw.WriteElementString("Flags", Convert.ToString((uint)landData.Flags)); 225 xtw.WriteElementString("Flags", Convert.ToString((uint)landData.Flags));
@@ -227,13 +232,8 @@ namespace OpenSim.Framework.Serialization.External
227 xtw.WriteElementString("MediaURL", landData.MediaURL); 232 xtw.WriteElementString("MediaURL", landData.MediaURL);
228 xtw.WriteElementString("MusicURL", landData.MusicURL); 233 xtw.WriteElementString("MusicURL", landData.MusicURL);
229 234
230 UUID ownerIdToWrite; 235 UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : landData.OwnerID;
231 if (options != null && options.ContainsKey("wipe-owners")) 236 xtw.WriteElementString("OwnerID", ownerID.ToString());
232 ownerIdToWrite = UUID.Zero;
233 else
234 ownerIdToWrite = landData.OwnerID;
235
236 xtw.WriteElementString("OwnerID", ownerIdToWrite.ToString());
237 237
238 xtw.WriteStartElement("ParcelAccessList"); 238 xtw.WriteStartElement("ParcelAccessList");
239 foreach (LandAccessEntry pal in landData.ParcelAccessList) 239 foreach (LandAccessEntry pal in landData.ParcelAccessList)
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
index ea100ee..e81cb78 100644
--- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
+++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
@@ -121,7 +121,8 @@ namespace OpenSim.Framework.Serialization.Tests
121 TestHelpers.InMethod(); 121 TestHelpers.InMethod();
122// log4net.Config.XmlConfigurator.Configure(); 122// log4net.Config.XmlConfigurator.Configure();
123 123
124 LandData ld = LandDataSerializer.Deserialize(LandDataSerializer.Serialize(this.land, null)); 124 Dictionary<string, object> options = new Dictionary<string, object>();
125 LandData ld = LandDataSerializer.Deserialize(LandDataSerializer.Serialize(this.land, options));
125 Assert.That(ld, Is.Not.Null, "Deserialize(string) returned null"); 126 Assert.That(ld, Is.Not.Null, "Deserialize(string) returned null");
126// Assert.That(ld.AABBMax, Is.EqualTo(land.AABBMax)); 127// Assert.That(ld.AABBMax, Is.EqualTo(land.AABBMax));
127// Assert.That(ld.AABBMin, Is.EqualTo(land.AABBMin)); 128// Assert.That(ld.AABBMin, Is.EqualTo(land.AABBMin));
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index e08a42d..b31257d 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -585,7 +585,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
585 ld.GlobalID = landID; 585 ld.GlobalID = landID;
586 586
587 string ldPath = ArchiveConstants.CreateOarLandDataPath(ld); 587 string ldPath = ArchiveConstants.CreateOarLandDataPath(ld);
588 tar.WriteFile(ldPath, LandDataSerializer.Serialize(ld, null)); 588 Dictionary<string, object> options = new Dictionary<string, object>();
589 tar.WriteFile(ldPath, LandDataSerializer.Serialize(ld, options));
589 tar.Close(); 590 tar.Close();
590 591
591 oarStream = new MemoryStream(oarStream.ToArray()); 592 oarStream = new MemoryStream(oarStream.ToArray());
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
1343 writer.WriteElementString("SalePrice", sop.SalePrice.ToString()); 1343 writer.WriteElementString("SalePrice", sop.SalePrice.ToString());
1344 writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); 1344 writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString());
1345 writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); 1345 writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString());
1346 WriteUUID(writer, "GroupID", sop.GroupID, options); 1346
1347 UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.GroupID;
1348 WriteUUID(writer, "GroupID", groupID, options);
1347 1349
1348 UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID; 1350 UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID;
1349 WriteUUID(writer, "OwnerID", ownerID, options); 1351 WriteUUID(writer, "OwnerID", ownerID, options);
@@ -1469,7 +1471,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1469 writer.WriteElementString("Description", item.Description); 1471 writer.WriteElementString("Description", item.Description);
1470 writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString()); 1472 writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString());
1471 writer.WriteElementString("Flags", item.Flags.ToString()); 1473 writer.WriteElementString("Flags", item.Flags.ToString());
1472 WriteUUID(writer, "GroupID", item.GroupID, options); 1474
1475 UUID groupID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.GroupID;
1476 WriteUUID(writer, "GroupID", groupID, options);
1477
1473 writer.WriteElementString("GroupPermissions", item.GroupPermissions.ToString()); 1478 writer.WriteElementString("GroupPermissions", item.GroupPermissions.ToString());
1474 writer.WriteElementString("InvType", item.InvType.ToString()); 1479 writer.WriteElementString("InvType", item.InvType.ToString());
1475 WriteUUID(writer, "ItemID", item.ItemID, options); 1480 WriteUUID(writer, "ItemID", item.ItemID, options);
@@ -1490,7 +1495,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1490 WriteUUID(writer, "PermsGranter", item.PermsGranter, options); 1495 WriteUUID(writer, "PermsGranter", item.PermsGranter, options);
1491 writer.WriteElementString("PermsMask", item.PermsMask.ToString()); 1496 writer.WriteElementString("PermsMask", item.PermsMask.ToString());
1492 writer.WriteElementString("Type", item.Type.ToString()); 1497 writer.WriteElementString("Type", item.Type.ToString());
1493 writer.WriteElementString("OwnerChanged", item.OwnerChanged.ToString().ToLower()); 1498
1499 bool ownerChanged = options.ContainsKey("wipe-owners") ? false : item.OwnerChanged;
1500 writer.WriteElementString("OwnerChanged", ownerChanged.ToString().ToLower());
1494 1501
1495 writer.WriteEndElement(); // TaskInventoryItem 1502 writer.WriteEndElement(); // TaskInventoryItem
1496 } 1503 }