From f8e0653e73932bae20f483e0ce669f1623c6ff1e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 5 May 2009 16:45:21 +0000 Subject: * If an item creator id contains an iar loaded name, create a temporary profile and hashed UUID to represent the user --- OpenSim/Framework/InventoryItemBase.cs | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'OpenSim/Framework/InventoryItemBase.cs') diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index 61771ab..f874de1 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -48,38 +48,30 @@ namespace OpenSim.Framework /// /// The creator of this item /// - public string CreatorId - { - get { return m_creatorId; } - set - { - m_creatorId = value; - UUID creatorIdAsUuid; - - // For now, all IDs are UUIDs - UUID.TryParse(m_creatorId, out creatorIdAsUuid); - CreatorIdAsUuid = creatorIdAsUuid; - } - } - - private string m_creatorId = String.Empty; + public string CreatorId { get; set; } /// - /// The creator of this item expressed as a UUID + /// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by + /// upstream code (or set by the get accessor if left unset). /// - public UUID CreatorIdAsUuid + public UUID CreatorIdAsUuid { get { + if (UUID.Zero == m_creatorIdAsUuid) + { + UUID.TryParse(CreatorId, out m_creatorIdAsUuid); + } + return m_creatorIdAsUuid; } + set { m_creatorIdAsUuid = value; } - } - - private UUID m_creatorIdAsUuid = UUID.Zero; + } + protected UUID m_creatorIdAsUuid = UUID.Zero; /// /// The description of the inventory item (must be less than 64 characters) -- cgit v1.1