diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
9 files changed, 148 insertions, 38 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 8683476..145875b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -291,12 +291,16 @@ namespace OpenSim | |||
291 | 291 | ||
292 | m_console.Commands.AddCommand("region", false, "save oar", | 292 | m_console.Commands.AddCommand("region", false, "save oar", |
293 | //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]", | 293 | //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]", |
294 | "save oar [-h|--home=<url>] [--noassets] [--perm=<permissions>] [<OAR path>]", | 294 | "save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]", |
295 | "Save a region's data to an OAR archive.", | 295 | "Save a region's data to an OAR archive.", |
296 | // "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine | 296 | // "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine |
297 | "-h|--home=<url> adds the url of the profile service to the saved user information." + Environment.NewLine | 297 | "-h|--home=<url> adds the url of the profile service to the saved user information." + Environment.NewLine |
298 | + "--noassets stops assets being saved to the OAR." + Environment.NewLine | 298 | + "--noassets stops assets being saved to the OAR." + Environment.NewLine |
299 | + "--perm stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine | 299 | + "--publish saves an OAR stripped of owner and last owner information." + Environment.NewLine |
300 | + " on reload, the estate owner will be the owner of all objects" + Environment.NewLine | ||
301 | + " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published" + Environment.NewLine | ||
302 | + " this option is EXPERIMENTAL" + Environment.NewLine | ||
303 | + "--perm=<permissions> stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine | ||
300 | + " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine | 304 | + " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine |
301 | + "The OAR path must be a filesystem path." | 305 | + "The OAR path must be a filesystem path." |
302 | + " If this is not given then the oar is saved to region.oar in the current directory.", | 306 | + " If this is not given then the oar is saved to region.oar in the current directory.", |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index edc5ba4..a6dbaba 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -116,6 +116,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
116 | m_merge = merge; | 116 | m_merge = merge; |
117 | m_skipAssets = skipAssets; | 117 | m_skipAssets = skipAssets; |
118 | m_requestId = requestId; | 118 | m_requestId = requestId; |
119 | |||
120 | // Zero can never be a valid user id | ||
121 | m_validUserUuids[UUID.Zero] = false; | ||
119 | } | 122 | } |
120 | 123 | ||
121 | public ArchiveReadRequest(Scene scene, Stream loadStream, bool merge, bool skipAssets, Guid requestId) | 124 | public ArchiveReadRequest(Scene scene, Stream loadStream, bool merge, bool skipAssets, Guid requestId) |
@@ -125,6 +128,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
125 | m_merge = merge; | 128 | m_merge = merge; |
126 | m_skipAssets = skipAssets; | 129 | m_skipAssets = skipAssets; |
127 | m_requestId = requestId; | 130 | m_requestId = requestId; |
131 | |||
132 | // Zero can never be a valid user id | ||
133 | m_validUserUuids[UUID.Zero] = false; | ||
128 | } | 134 | } |
129 | 135 | ||
130 | /// <summary> | 136 | /// <summary> |
@@ -368,16 +374,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
368 | if (!m_validUserUuids.ContainsKey(uuid)) | 374 | if (!m_validUserUuids.ContainsKey(uuid)) |
369 | { | 375 | { |
370 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); | 376 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); |
371 | if (account != null) | 377 | m_validUserUuids.Add(uuid, account != null); |
372 | m_validUserUuids.Add(uuid, true); | ||
373 | else | ||
374 | m_validUserUuids.Add(uuid, false); | ||
375 | } | 378 | } |
376 | 379 | ||
377 | if (m_validUserUuids[uuid]) | 380 | return m_validUserUuids[uuid]; |
378 | return true; | ||
379 | else | ||
380 | return false; | ||
381 | } | 381 | } |
382 | 382 | ||
383 | /// <summary> | 383 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index b895afe..ffcf063 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -282,10 +282,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
282 | // always (incorrectly) includes the Copy bit set in this case. But that's a mistake: the viewer | 282 | // always (incorrectly) includes the Copy bit set in this case. But that's a mistake: the viewer |
283 | // does NOT show that the object has Everyone-Copy permissions, and doesn't allow it to be copied. | 283 | // does NOT show that the object has Everyone-Copy permissions, and doesn't allow it to be copied. |
284 | if (permissionClass != PermissionClass.Owner) | 284 | if (permissionClass != PermissionClass.Owner) |
285 | { | ||
286 | canTransfer |= (obj.EveryoneMask & (uint)PermissionMask.Copy) != 0; | 285 | canTransfer |= (obj.EveryoneMask & (uint)PermissionMask.Copy) != 0; |
287 | } | ||
288 | |||
289 | 286 | ||
290 | bool partPermitted = true; | 287 | bool partPermitted = true; |
291 | if (checkPermissions.Contains("C") && !canCopy) | 288 | if (checkPermissions.Contains("C") && !canCopy) |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 0b22598..f5a5a8d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -142,6 +142,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
142 | ops.Add("h|home=", delegate(string v) { options["home"] = v; }); | 142 | ops.Add("h|home=", delegate(string v) { options["home"] = v; }); |
143 | 143 | ||
144 | ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); | 144 | ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); |
145 | ops.Add("publish", v => options["wipe-owners"] = v != null); | ||
145 | ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; }); | 146 | ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; }); |
146 | 147 | ||
147 | List<string> mainParams = ops.Parse(cmdparams); | 148 | List<string> mainParams = ops.Parse(cmdparams); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index eec3c1b..63f1363 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -248,9 +248,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
248 | Dictionary<string, Object> options = new Dictionary<string, Object>(); | 248 | Dictionary<string, Object> options = new Dictionary<string, Object>(); |
249 | options.Add("noassets", true); | 249 | options.Add("noassets", true); |
250 | m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); | 250 | m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); |
251 | //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; | ||
252 | //while (assetServer.HasWaitingRequests()) | ||
253 | // assetServer.ProcessNextRequest(); | ||
254 | 251 | ||
255 | // Don't wait for completion - with --noassets save oar happens synchronously | 252 | // Don't wait for completion - with --noassets save oar happens synchronously |
256 | // Monitor.Wait(this, 60000); | 253 | // Monitor.Wait(this, 60000); |
@@ -410,6 +407,86 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
410 | } | 407 | } |
411 | 408 | ||
412 | /// <summary> | 409 | /// <summary> |
410 | /// Test loading an OpenSim Region Archive saved with the --publish option. | ||
411 | /// </summary> | ||
412 | [Test] | ||
413 | public void TestLoadPublishedOar() | ||
414 | { | ||
415 | TestHelpers.InMethod(); | ||
416 | // log4net.Config.XmlConfigurator.Configure(); | ||
417 | |||
418 | SceneObjectPart part1 = CreateSceneObjectPart1(); | ||
419 | SceneObjectGroup sog1 = new SceneObjectGroup(part1); | ||
420 | m_scene.AddNewSceneObject(sog1, false); | ||
421 | |||
422 | SceneObjectPart part2 = CreateSceneObjectPart2(); | ||
423 | |||
424 | AssetNotecard nc = new AssetNotecard(); | ||
425 | nc.BodyText = "Hello World!"; | ||
426 | nc.Encode(); | ||
427 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | ||
428 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | ||
429 | AssetBase ncAsset | ||
430 | = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); | ||
431 | m_scene.AssetService.Store(ncAsset); | ||
432 | SceneObjectGroup sog2 = new SceneObjectGroup(part2); | ||
433 | TaskInventoryItem ncItem | ||
434 | = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid }; | ||
435 | part2.Inventory.AddInventoryItem(ncItem, true); | ||
436 | |||
437 | m_scene.AddNewSceneObject(sog2, false); | ||
438 | |||
439 | MemoryStream archiveWriteStream = new MemoryStream(); | ||
440 | m_scene.EventManager.OnOarFileSaved += SaveCompleted; | ||
441 | |||
442 | Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); | ||
443 | |||
444 | lock (this) | ||
445 | { | ||
446 | m_archiverModule.ArchiveRegion( | ||
447 | archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } }); | ||
448 | |||
449 | Monitor.Wait(this, 60000); | ||
450 | } | ||
451 | |||
452 | Assert.That(m_lastRequestId, Is.EqualTo(requestId)); | ||
453 | |||
454 | byte[] archive = archiveWriteStream.ToArray(); | ||
455 | MemoryStream archiveReadStream = new MemoryStream(archive); | ||
456 | |||
457 | { | ||
458 | UUID estateOwner = TestHelpers.ParseTail(0x4747); | ||
459 | UUID objectOwner = TestHelpers.ParseTail(0x15); | ||
460 | |||
461 | // Reload to new scene | ||
462 | ArchiverModule archiverModule = new ArchiverModule(); | ||
463 | SerialiserModule serialiserModule = new SerialiserModule(); | ||
464 | TerrainModule terrainModule = new TerrainModule(); | ||
465 | |||
466 | TestScene scene2 = SceneHelpers.SetupScene(); | ||
467 | SceneHelpers.SetupSceneModules(scene2, archiverModule, serialiserModule, terrainModule); | ||
468 | |||
469 | // Make sure there's a valid owner for the owner we saved (this should have been wiped if the code is | ||
470 | // behaving correctly | ||
471 | UserAccountHelpers.CreateUserWithInventory(scene2, objectOwner); | ||
472 | |||
473 | scene2.RegionInfo.EstateSettings.EstateOwner = estateOwner; | ||
474 | |||
475 | lock (this) | ||
476 | { | ||
477 | scene2.EventManager.OnOarFileLoaded += LoadCompleted; | ||
478 | archiverModule.DearchiveRegion(archiveReadStream); | ||
479 | } | ||
480 | |||
481 | Assert.That(m_lastErrorMessage, Is.Null); | ||
482 | |||
483 | SceneObjectGroup loadedSog = scene2.GetSceneObjectGroup(part1.Name); | ||
484 | Assert.That(loadedSog.OwnerID, Is.EqualTo(estateOwner)); | ||
485 | Assert.That(loadedSog.LastOwnerID, Is.EqualTo(estateOwner)); | ||
486 | } | ||
487 | } | ||
488 | |||
489 | /// <summary> | ||
413 | /// Test loading the region settings of an OpenSim Region Archive. | 490 | /// Test loading the region settings of an OpenSim Region Archive. |
414 | /// </summary> | 491 | /// </summary> |
415 | [Test] | 492 | [Test] |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f344dcc..dd3208a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1472,20 +1472,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1472 | // m_log.DebugFormat( | 1472 | // m_log.DebugFormat( |
1473 | // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", | 1473 | // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", |
1474 | // currentItem.Name, part.Name); | 1474 | // currentItem.Name, part.Name); |
1475 | |||
1476 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | ||
1477 | if (agentTransactions != null) | ||
1478 | { | ||
1479 | agentTransactions.HandleTaskItemUpdateFromTransaction( | ||
1480 | remoteClient, part, transactionID, currentItem); | ||
1481 | 1475 | ||
1482 | if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) | 1476 | // Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather |
1483 | remoteClient.SendAgentAlertMessage("Notecard saved", false); | 1477 | // than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes |
1484 | else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) | 1478 | // this to spew spurious errors and "thing saved" messages. |
1485 | remoteClient.SendAgentAlertMessage("Script saved", false); | 1479 | // Rather than retaining complexity in the code and removing useful error messages, I'm going to |
1486 | else | 1480 | // comment this section out. If this was still working for very old viewers and there is |
1487 | remoteClient.SendAgentAlertMessage("Item saved", false); | 1481 | // a large population using them which cannot upgrade to 1.23 or derivatives then we can revisit |
1488 | } | 1482 | // this - justincc |
1483 | // IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | ||
1484 | // if (agentTransactions != null) | ||
1485 | // { | ||
1486 | // agentTransactions.HandleTaskItemUpdateFromTransaction( | ||
1487 | // remoteClient, part, transactionID, currentItem); | ||
1488 | // | ||
1489 | // if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) | ||
1490 | // remoteClient.SendAgentAlertMessage("Notecard saved", false); | ||
1491 | // else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) | ||
1492 | // remoteClient.SendAgentAlertMessage("Script saved", false); | ||
1493 | // else | ||
1494 | // remoteClient.SendAgentAlertMessage("Item saved", false); | ||
1495 | // } | ||
1489 | 1496 | ||
1490 | // Base ALWAYS has move | 1497 | // Base ALWAYS has move |
1491 | currentItem.BasePermissions |= (uint)PermissionMask.Move; | 1498 | currentItem.BasePermissions |= (uint)PermissionMask.Move; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index cad09b8..739c5fa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -441,6 +441,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
441 | } | 441 | } |
442 | } | 442 | } |
443 | 443 | ||
444 | public UUID LastOwnerID | ||
445 | { | ||
446 | get { return m_rootPart.LastOwnerID; } | ||
447 | set { m_rootPart.LastOwnerID = value; } | ||
448 | } | ||
449 | |||
444 | public UUID OwnerID | 450 | public UUID OwnerID |
445 | { | 451 | { |
446 | get { return m_rootPart.OwnerID; } | 452 | get { return m_rootPart.OwnerID; } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ad3bcd5..36d3588 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4520,10 +4520,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4520 | /// <summary> | 4520 | /// <summary> |
4521 | /// Update the texture entry for this part. | 4521 | /// Update the texture entry for this part. |
4522 | /// </summary> | 4522 | /// </summary> |
4523 | /// <param name="textureEntry"></param> | 4523 | /// <param name="serializedTextureEntry"></param> |
4524 | public void UpdateTextureEntry(byte[] textureEntry) | 4524 | public void UpdateTextureEntry(byte[] serializedTextureEntry) |
4525 | { | ||
4526 | UpdateTextureEntry(new Primitive.TextureEntry(serializedTextureEntry, 0, serializedTextureEntry.Length)); | ||
4527 | } | ||
4528 | |||
4529 | /// <summary> | ||
4530 | /// Update the texture entry for this part. | ||
4531 | /// </summary> | ||
4532 | /// <param name="newTex"></param> | ||
4533 | public void UpdateTextureEntry(Primitive.TextureEntry newTex) | ||
4525 | { | 4534 | { |
4526 | Primitive.TextureEntry newTex = new Primitive.TextureEntry(textureEntry, 0, textureEntry.Length); | ||
4527 | Primitive.TextureEntry oldTex = Shape.Textures; | 4535 | Primitive.TextureEntry oldTex = Shape.Textures; |
4528 | 4536 | ||
4529 | Changed changeFlags = 0; | 4537 | Changed changeFlags = 0; |
@@ -4555,7 +4563,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4555 | break; | 4563 | break; |
4556 | } | 4564 | } |
4557 | 4565 | ||
4558 | m_shape.TextureEntry = textureEntry; | 4566 | m_shape.TextureEntry = newTex.GetBytes(); |
4559 | if (changeFlags != 0) | 4567 | if (changeFlags != 0) |
4560 | TriggerScriptChangedEvent(changeFlags); | 4568 | TriggerScriptChangedEvent(changeFlags); |
4561 | UpdateFlag = UpdateRequired.FULL; | 4569 | UpdateFlag = UpdateRequired.FULL; |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 7c60ddd..3a08271 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -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,7 +1282,6 @@ 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) |
@@ -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); |