diff options
author | Justin Clarke Casey | 2009-04-08 17:50:57 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-08 17:50:57 +0000 |
commit | f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856 (patch) | |
tree | cdcef4e023e1adf8bb4a83e5ebe81448dbf33c6b /OpenSim/Framework | |
parent | * Fix the remainder of the packets that require sessionId checks. (diff) | |
download | opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.zip opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.gz opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.bz2 opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/InventoryItemBase.cs | 33 |
3 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index 93f126f..ec62ed2 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
72 | { | 72 | { |
73 | InventoryItemBase item = new InventoryItemBase(); | 73 | InventoryItemBase item = new InventoryItemBase(); |
74 | item.Owner = libOwner; | 74 | item.Owner = libOwner; |
75 | item.Creator = libOwner; | 75 | item.CreatorId = libOwner.ToString(); |
76 | item.ID = inventoryID; | 76 | item.ID = inventoryID; |
77 | item.AssetID = assetID; | 77 | item.AssetID = assetID; |
78 | item.Description = description; | 78 | item.Description = description; |
@@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
159 | { | 159 | { |
160 | InventoryItemBase item = new InventoryItemBase(); | 160 | InventoryItemBase item = new InventoryItemBase(); |
161 | item.Owner = libOwner; | 161 | item.Owner = libOwner; |
162 | item.Creator = libOwner; | 162 | item.CreatorId = libOwner.ToString(); |
163 | item.ID = new UUID(config.GetString("inventoryID", ID.ToString())); | 163 | item.ID = new UUID(config.GetString("inventoryID", ID.ToString())); |
164 | item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString())); | 164 | item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString())); |
165 | item.Folder = new UUID(config.GetString("folderID", ID.ToString())); | 165 | item.Folder = new UUID(config.GetString("folderID", ID.ToString())); |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 1423e3a..a2e8042 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
440 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); | 440 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); |
441 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); | 441 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); |
442 | llsdItem.permissions = new LLSDPermissions(); | 442 | llsdItem.permissions = new LLSDPermissions(); |
443 | llsdItem.permissions.creator_id = invItem.Creator; | 443 | llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid; |
444 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; | 444 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; |
445 | llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; | 445 | llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; |
446 | llsdItem.permissions.group_id = UUID.Zero; | 446 | llsdItem.permissions.group_id = UUID.Zero; |
@@ -789,7 +789,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
789 | 789 | ||
790 | InventoryItemBase item = new InventoryItemBase(); | 790 | InventoryItemBase item = new InventoryItemBase(); |
791 | item.Owner = m_agentID; | 791 | item.Owner = m_agentID; |
792 | item.Creator = m_agentID; | 792 | item.CreatorId = m_agentID.ToString(); |
793 | item.ID = inventoryItem; | 793 | item.ID = inventoryItem; |
794 | item.AssetID = asset.FullID; | 794 | item.AssetID = asset.FullID; |
795 | item.Description = assetDescription; | 795 | item.Description = assetDescription; |
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index 21683c4..ae3777c 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -53,8 +53,16 @@ namespace OpenSim.Framework | |||
53 | /// <summary> | 53 | /// <summary> |
54 | /// The creator of this item | 54 | /// The creator of this item |
55 | /// </summary> | 55 | /// </summary> |
56 | private UUID _creator; | 56 | private string m_creatorId = String.Empty; |
57 | |||
58 | /// <summary> | ||
59 | /// The creator of this item expressed as a UUID | ||
60 | /// </summary> | ||
61 | private UUID m_creatorIdAsUuid = UUID.Zero; | ||
57 | 62 | ||
63 | /// <summary> | ||
64 | /// | ||
65 | /// </summary> | ||
58 | private uint _nextPermissions; | 66 | private uint _nextPermissions; |
59 | 67 | ||
60 | /// <summary> | 68 | /// <summary> |
@@ -129,10 +137,27 @@ namespace OpenSim.Framework | |||
129 | set { _folder = value; } | 137 | set { _folder = value; } |
130 | } | 138 | } |
131 | 139 | ||
132 | public UUID Creator | 140 | /// <value> |
141 | /// The creator ID | ||
142 | /// </value> | ||
143 | public string CreatorId | ||
144 | { | ||
145 | get { return m_creatorId; } | ||
146 | set | ||
147 | { | ||
148 | m_creatorId = value; | ||
149 | |||
150 | // For now, all IDs are UUIDs | ||
151 | UUID.TryParse(m_creatorId, out m_creatorIdAsUuid); | ||
152 | } | ||
153 | } | ||
154 | |||
155 | /// <value> | ||
156 | /// The creator ID expressed as a UUID | ||
157 | /// </value> | ||
158 | public UUID CreatorIdAsUuid | ||
133 | { | 159 | { |
134 | get { return _creator; } | 160 | get { return m_creatorIdAsUuid; } |
135 | set { _creator = value; } | ||
136 | } | 161 | } |
137 | 162 | ||
138 | public string Description | 163 | public string Description |