From f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 8 Apr 2009 17:50:57 +0000 Subject: * Make it possible to store creator strings in user inventory items as well as UUIDs * All existing functionality should be unaffected. * Database schemas have not been changed. --- OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs | 2 +- .../Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs | 6 ++---- OpenSim/Grid/AssetInventoryServer/Utils.cs | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs index 06b0220..e19160a 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs @@ -216,7 +216,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins writer.WriteString(item.InvType.ToString()); writer.WriteEndElement(); writer.WriteStartElement("CreatorUUID"); - writer.WriteString(item.Creator.ToString()); + writer.WriteString(item.CreatorId); writer.WriteEndElement(); writer.WriteStartElement("CreationDate"); writer.WriteString(item.CreationDate.ToString()); diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs index c226a26..a905473 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs @@ -598,7 +598,6 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim { InventoryItemBase item = new InventoryItemBase(); - try { using (XmlReader reader = XmlReader.Create(stream)) @@ -624,9 +623,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim ReadUUID(reader, "Folder", out dummyUUID); item.Folder = dummyUUID; - ReadUUID(reader, "Creator", out dummyUUID); - item.Creator = dummyUUID; + item.CreatorId = reader.ReadElementContentAsString("Creator", String.Empty); item.Description = reader.ReadElementContentAsString("Description", String.Empty); uint dummyUInt; @@ -757,7 +755,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim writer.WriteElementString("InvType", XmlConvert.ToString(item.InvType)); WriteUUID(writer, "Folder", item.Folder); WriteUUID(writer, "Owner", item.Owner); - WriteUUID(writer, "Creator", item.Creator); + writer.WriteElementString("Creator", item.CreatorId); writer.WriteElementString("Name", item.Name); writer.WriteElementString("Description", item.Description); writer.WriteElementString("NextPermissions", XmlConvert.ToString(item.NextPermissions)); diff --git a/OpenSim/Grid/AssetInventoryServer/Utils.cs b/OpenSim/Grid/AssetInventoryServer/Utils.cs index 58b0c67..c79a426 100644 --- a/OpenSim/Grid/AssetInventoryServer/Utils.cs +++ b/OpenSim/Grid/AssetInventoryServer/Utils.cs @@ -515,7 +515,7 @@ namespace OpenSim.Grid.AssetInventoryServer else if (Reader.LocalName == "Creator" && Reader.NamespaceURI == "" && !b13) { b13 = true; - ob.@Creator = ReadObject_UUID(false, true); + ob.@CreatorId = Reader.ReadElementString(); } else if (Reader.LocalName == "Owner" && Reader.NamespaceURI == "" && !b12) { @@ -876,7 +876,7 @@ namespace OpenSim.Grid.AssetInventoryServer WriteElementString("InvType", "", ob.@InvType.ToString(CultureInfo.InvariantCulture)); WriteObject_UUID(ob.@Folder, "Folder", "", false, false, true); WriteObject_UUID(ob.@Owner, "Owner", "", false, false, true); - WriteObject_UUID(ob.@Creator, "Creator", "", false, false, true); + WriteElementString("Creator", "", ob.@CreatorId); WriteElementString("Name", "", ob.@Name); WriteElementString("Description", "", ob.@Description); WriteElementString("NextPermissions", "", ob.@NextPermissions.ToString(CultureInfo.InvariantCulture)); -- cgit v1.1