aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/InventoryItemBase.cs
diff options
context:
space:
mode:
authorDiva Canto2010-11-21 17:19:24 -0800
committerDiva Canto2010-11-21 17:19:24 -0800
commitc617d658dda92ad97de678d477a98c3df0659303 (patch)
tree9a86356af2fcf4ae4eab18b53dc7330bf3e26a86 /OpenSim/Framework/InventoryItemBase.cs
parentUpdated SQLiteLegacy/SQLiteSimulationData with the same. Is this crap still u... (diff)
downloadopensim-SC_OLD-c617d658dda92ad97de678d477a98c3df0659303.zip
opensim-SC_OLD-c617d658dda92ad97de678d477a98c3df0659303.tar.gz
opensim-SC_OLD-c617d658dda92ad97de678d477a98c3df0659303.tar.bz2
opensim-SC_OLD-c617d658dda92ad97de678d477a98c3df0659303.tar.xz
Added creator info across the board -- TaskInventoryItems and InventoryItems themselves. Tested. Seems to be working, main tests pass. Nothing done for IARs or HG transfers yet -- this only works for OARs for the time being.
New migration in inventory table in order to make CreatorID varchar(255).
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index aeb01e2..ce4fc38 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -117,6 +117,56 @@ namespace OpenSim.Framework
117 } 117 }
118 protected UUID m_creatorIdAsUuid = UUID.Zero; 118 protected UUID m_creatorIdAsUuid = UUID.Zero;
119 119
120 protected string m_creatorData;
121 public string CreatorData // = <profile url>;<name>
122 {
123 get { return m_creatorData; }
124 set { m_creatorData = value; }
125 }
126
127 /// <summary>
128 /// Used by the DB layer to retrieve / store the entire user identification.
129 /// The identification can either be a simple UUID or a string of the form
130 /// uuid[;profile_url[;name]]
131 /// </summary>
132 public string CreatorIdentification
133 {
134 get
135 {
136 if (m_creatorData != null && m_creatorData != string.Empty)
137 return m_creatorId + ';' + m_creatorData;
138 else
139 return m_creatorId;
140 }
141 set
142 {
143 if ((value == null) || (value != null && value == string.Empty))
144 {
145 m_creatorData = string.Empty;
146 return;
147 }
148
149 if (!value.Contains(";")) // plain UUID
150 {
151 m_creatorId = value;
152 }
153 else // <uuid>[;<endpoint>[;name]]
154 {
155 string name = "Unknown User";
156 string[] parts = value.Split(';');
157 if (parts.Length >= 1)
158 m_creatorId = parts[0];
159 if (parts.Length >= 2)
160 m_creatorData = parts[1];
161 if (parts.Length >= 3)
162 name = parts[2];
163
164 m_creatorData += ';' + name;
165
166 }
167 }
168 }
169
120 /// <value> 170 /// <value>
121 /// The description of the inventory item (must be less than 64 characters) 171 /// The description of the inventory item (must be less than 64 characters)
122 /// </value> 172 /// </value>