diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index bca49f7..3a08271 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
54 | /// Deserialize a scene object from the original xml format | 54 | /// Deserialize a scene object from the original xml format |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="xmlData"></param> | 56 | /// <param name="xmlData"></param> |
57 | /// <returns></returns> | 57 | /// <returns>The scene object deserialized. Null on failure.</returns> |
58 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 58 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
59 | { | 59 | { |
60 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 60 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |
@@ -1134,12 +1134,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1134 | 1134 | ||
1135 | if (sop.CreatorData != null && sop.CreatorData != string.Empty) | 1135 | if (sop.CreatorData != null && sop.CreatorData != string.Empty) |
1136 | writer.WriteElementString("CreatorData", sop.CreatorData); | 1136 | writer.WriteElementString("CreatorData", sop.CreatorData); |
1137 | else if (options.ContainsKey("profile")) | 1137 | else if (options.ContainsKey("home")) |
1138 | { | 1138 | { |
1139 | if (m_UserManagement == null) | 1139 | if (m_UserManagement == null) |
1140 | m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>(); | 1140 | m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>(); |
1141 | string name = m_UserManagement.GetUserName(sop.CreatorID); | 1141 | string name = m_UserManagement.GetUserName(sop.CreatorID); |
1142 | writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + sop.CreatorID + ";" + name); | 1142 | writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name); |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | WriteUUID(writer, "FolderID", sop.FolderID, options); | 1145 | WriteUUID(writer, "FolderID", sop.FolderID, options); |
@@ -1192,8 +1192,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1192 | writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); | 1192 | writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); |
1193 | writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); | 1193 | writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); |
1194 | WriteUUID(writer, "GroupID", sop.GroupID, options); | 1194 | WriteUUID(writer, "GroupID", sop.GroupID, options); |
1195 | WriteUUID(writer, "OwnerID", sop.OwnerID, options); | 1195 | |
1196 | WriteUUID(writer, "LastOwnerID", sop.LastOwnerID, options); | 1196 | UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID; |
1197 | WriteUUID(writer, "OwnerID", ownerID, options); | ||
1198 | |||
1199 | UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID; | ||
1200 | WriteUUID(writer, "LastOwnerID", lastOwnerID, options); | ||
1201 | |||
1197 | writer.WriteElementString("BaseMask", sop.BaseMask.ToString()); | 1202 | writer.WriteElementString("BaseMask", sop.BaseMask.ToString()); |
1198 | writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); | 1203 | writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); |
1199 | writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); | 1204 | writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); |
@@ -1277,17 +1282,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1277 | writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); | 1282 | writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); |
1278 | writer.WriteElementString("CreationDate", item.CreationDate.ToString()); | 1283 | writer.WriteElementString("CreationDate", item.CreationDate.ToString()); |
1279 | 1284 | ||
1280 | |||
1281 | WriteUUID(writer, "CreatorID", item.CreatorID, options); | 1285 | WriteUUID(writer, "CreatorID", item.CreatorID, options); |
1282 | 1286 | ||
1283 | if (item.CreatorData != null && item.CreatorData != string.Empty) | 1287 | if (item.CreatorData != null && item.CreatorData != string.Empty) |
1284 | writer.WriteElementString("CreatorData", item.CreatorData); | 1288 | writer.WriteElementString("CreatorData", item.CreatorData); |
1285 | else if (options.ContainsKey("profile")) | 1289 | else if (options.ContainsKey("home")) |
1286 | { | 1290 | { |
1287 | if (m_UserManagement == null) | 1291 | if (m_UserManagement == null) |
1288 | m_UserManagement = scene.RequestModuleInterface<IUserManagement>(); | 1292 | m_UserManagement = scene.RequestModuleInterface<IUserManagement>(); |
1289 | string name = m_UserManagement.GetUserName(item.CreatorID); | 1293 | string name = m_UserManagement.GetUserName(item.CreatorID); |
1290 | writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + item.CreatorID + ";" + name); | 1294 | writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name); |
1291 | } | 1295 | } |
1292 | 1296 | ||
1293 | writer.WriteElementString("Description", item.Description); | 1297 | writer.WriteElementString("Description", item.Description); |
@@ -1298,10 +1302,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1298 | writer.WriteElementString("InvType", item.InvType.ToString()); | 1302 | writer.WriteElementString("InvType", item.InvType.ToString()); |
1299 | WriteUUID(writer, "ItemID", item.ItemID, options); | 1303 | WriteUUID(writer, "ItemID", item.ItemID, options); |
1300 | WriteUUID(writer, "OldItemID", item.OldItemID, options); | 1304 | WriteUUID(writer, "OldItemID", item.OldItemID, options); |
1301 | WriteUUID(writer, "LastOwnerID", item.LastOwnerID, options); | 1305 | |
1306 | UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.LastOwnerID; | ||
1307 | WriteUUID(writer, "LastOwnerID", lastOwnerID, options); | ||
1308 | |||
1302 | writer.WriteElementString("Name", item.Name); | 1309 | writer.WriteElementString("Name", item.Name); |
1303 | writer.WriteElementString("NextPermissions", item.NextPermissions.ToString()); | 1310 | writer.WriteElementString("NextPermissions", item.NextPermissions.ToString()); |
1304 | WriteUUID(writer, "OwnerID", item.OwnerID, options); | 1311 | |
1312 | UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.OwnerID; | ||
1313 | WriteUUID(writer, "OwnerID", ownerID, options); | ||
1314 | |||
1305 | writer.WriteElementString("CurrentPermissions", item.CurrentPermissions.ToString()); | 1315 | writer.WriteElementString("CurrentPermissions", item.CurrentPermissions.ToString()); |
1306 | WriteUUID(writer, "ParentID", item.ParentID, options); | 1316 | WriteUUID(writer, "ParentID", item.ParentID, options); |
1307 | WriteUUID(writer, "ParentPartID", item.ParentPartID, options); | 1317 | WriteUUID(writer, "ParentPartID", item.ParentPartID, options); |