aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs6
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs1
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs4
-rw-r--r--OpenSim/Data/MySQL/Resources/InventoryStore.migrations8
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations1
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs4
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs4
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs4
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs50
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs56
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs1
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs61
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs25
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs23
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs2
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs4
24 files changed, 272 insertions, 53 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 15adb99..c09252a 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -1584,6 +1584,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1584 destinationItem.InvType = item.InvType; 1584 destinationItem.InvType = item.InvType;
1585 destinationItem.CreatorId = item.CreatorId; 1585 destinationItem.CreatorId = item.CreatorId;
1586 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; 1586 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
1587 destinationItem.CreatorData = item.CreatorData;
1587 destinationItem.NextPermissions = item.NextPermissions; 1588 destinationItem.NextPermissions = item.NextPermissions;
1588 destinationItem.CurrentPermissions = item.CurrentPermissions; 1589 destinationItem.CurrentPermissions = item.CurrentPermissions;
1589 destinationItem.BasePermissions = item.BasePermissions; 1590 destinationItem.BasePermissions = item.BasePermissions;
@@ -1636,6 +1637,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1636 destinationItem.InvType = item.InvType; 1637 destinationItem.InvType = item.InvType;
1637 destinationItem.CreatorId = item.CreatorId; 1638 destinationItem.CreatorId = item.CreatorId;
1638 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; 1639 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
1640 destinationItem.CreatorData = item.CreatorData;
1639 destinationItem.NextPermissions = item.NextPermissions; 1641 destinationItem.NextPermissions = item.NextPermissions;
1640 destinationItem.CurrentPermissions = item.CurrentPermissions; 1642 destinationItem.CurrentPermissions = item.CurrentPermissions;
1641 destinationItem.BasePermissions = item.BasePermissions; 1643 destinationItem.BasePermissions = item.BasePermissions;
@@ -1743,6 +1745,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1743 destinationItem.InvType = item.InvType; 1745 destinationItem.InvType = item.InvType;
1744 destinationItem.CreatorId = item.CreatorId; 1746 destinationItem.CreatorId = item.CreatorId;
1745 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; 1747 destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid;
1748 destinationItem.CreatorData = item.CreatorData;
1746 destinationItem.NextPermissions = item.NextPermissions; 1749 destinationItem.NextPermissions = item.NextPermissions;
1747 destinationItem.CurrentPermissions = item.CurrentPermissions; 1750 destinationItem.CurrentPermissions = item.CurrentPermissions;
1748 destinationItem.BasePermissions = item.BasePermissions; 1751 destinationItem.BasePermissions = item.BasePermissions;
@@ -2026,7 +2029,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2026 inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); 2029 inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1);
2027 inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); 2030 inventoryItem.CreatorId = GetStringAttribute(item,"creatorid","");
2028 inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); 2031 inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid","");
2029 inventoryItem.NextPermissions = GetUnsignedAttribute(perms,"next",0x7fffffff); 2032 inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", "");
2033 inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff);
2030 inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); 2034 inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff);
2031 inventoryItem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff); 2035 inventoryItem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff);
2032 inventoryItem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff); 2036 inventoryItem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff);
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index a4135db..c3cf08c 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -1295,6 +1295,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1295 rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString()); 1295 rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString());
1296 rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString()); 1296 rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString());
1297 rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId); 1297 rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId);
1298 rdata.writer.WriteAttributeString("creatordata", String.Empty, i.CreatorData);
1298 rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString()); 1299 rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString());
1299 rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString()); 1300 rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString());
1300 rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString()); 1301 rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString());
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index f630dc1..02997b3 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -1243,7 +1243,7 @@ namespace OpenSim.Data.MySQL
1243 taskItem.Name = (String)row["name"]; 1243 taskItem.Name = (String)row["name"];
1244 taskItem.Description = (String)row["description"]; 1244 taskItem.Description = (String)row["description"];
1245 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1245 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1246 taskItem.CreatorID = DBGuid.FromDB(row["creatorID"]); 1246 taskItem.CreatorIdentification = (String)row["creatorID"];
1247 taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); 1247 taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]);
1248 taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); 1248 taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]);
1249 taskItem.GroupID = DBGuid.FromDB(row["groupID"]); 1249 taskItem.GroupID = DBGuid.FromDB(row["groupID"]);
@@ -1583,7 +1583,7 @@ namespace OpenSim.Data.MySQL
1583 cmd.Parameters.AddWithValue("name", taskItem.Name); 1583 cmd.Parameters.AddWithValue("name", taskItem.Name);
1584 cmd.Parameters.AddWithValue("description", taskItem.Description); 1584 cmd.Parameters.AddWithValue("description", taskItem.Description);
1585 cmd.Parameters.AddWithValue("creationDate", taskItem.CreationDate); 1585 cmd.Parameters.AddWithValue("creationDate", taskItem.CreationDate);
1586 cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorID); 1586 cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorIdentification);
1587 cmd.Parameters.AddWithValue("ownerID", taskItem.OwnerID); 1587 cmd.Parameters.AddWithValue("ownerID", taskItem.OwnerID);
1588 cmd.Parameters.AddWithValue("lastOwnerID", taskItem.LastOwnerID); 1588 cmd.Parameters.AddWithValue("lastOwnerID", taskItem.LastOwnerID);
1589 cmd.Parameters.AddWithValue("groupID", taskItem.GroupID); 1589 cmd.Parameters.AddWithValue("groupID", taskItem.GroupID);
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
index 3e9bad5..993a5a0 100644
--- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
@@ -99,3 +99,11 @@ BEGIN;
99alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000'; 99alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000';
100 100
101COMMIT; 101COMMIT;
102
103:VERSION 6 # ------------
104
105BEGIN;
106
107alter table inventoryitems modify column creatorID varchar(255) not NULL default '00000000-0000-0000-0000-000000000000';
108
109COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 364c4d3..ba8d538 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -823,5 +823,6 @@ COMMIT;
823BEGIN; 823BEGIN;
824 824
825ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; 825ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
826ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
826 827
827COMMIT; 828COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index d606f11..7dc07ec 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Data.SQLite
156 item.InvType = Convert.ToInt32(row["invType"]); 156 item.InvType = Convert.ToInt32(row["invType"]);
157 item.Folder = new UUID((string) row["parentFolderID"]); 157 item.Folder = new UUID((string) row["parentFolderID"]);
158 item.Owner = new UUID((string) row["avatarID"]); 158 item.Owner = new UUID((string) row["avatarID"]);
159 item.CreatorId = (string)row["creatorsID"]; 159 item.CreatorIdentification = (string)row["creatorsID"];
160 item.Name = (string) row["inventoryName"]; 160 item.Name = (string) row["inventoryName"];
161 item.Description = (string) row["inventoryDescription"]; 161 item.Description = (string) row["inventoryDescription"];
162 162
@@ -201,7 +201,7 @@ namespace OpenSim.Data.SQLite
201 row["invType"] = item.InvType; 201 row["invType"] = item.InvType;
202 row["parentFolderID"] = item.Folder.ToString(); 202 row["parentFolderID"] = item.Folder.ToString();
203 row["avatarID"] = item.Owner.ToString(); 203 row["avatarID"] = item.Owner.ToString();
204 row["creatorsID"] = item.CreatorId.ToString(); 204 row["creatorsID"] = item.CreatorIdentification.ToString();
205 row["inventoryName"] = item.Name; 205 row["inventoryName"] = item.Name;
206 row["inventoryDescription"] = item.Description; 206 row["inventoryDescription"] = item.Description;
207 207
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 85a3a37..0bfd73a 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1385,7 +1385,7 @@ namespace OpenSim.Data.SQLite
1385 taskItem.Name = (String)row["name"]; 1385 taskItem.Name = (String)row["name"];
1386 taskItem.Description = (String)row["description"]; 1386 taskItem.Description = (String)row["description"];
1387 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1387 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1388 taskItem.CreatorID = new UUID((String)row["creatorID"]); 1388 taskItem.CreatorIdentification = (String)row["creatorID"];
1389 taskItem.OwnerID = new UUID((String)row["ownerID"]); 1389 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1390 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); 1390 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1391 taskItem.GroupID = new UUID((String)row["groupID"]); 1391 taskItem.GroupID = new UUID((String)row["groupID"]);
@@ -1716,7 +1716,7 @@ namespace OpenSim.Data.SQLite
1716 row["name"] = taskItem.Name; 1716 row["name"] = taskItem.Name;
1717 row["description"] = taskItem.Description; 1717 row["description"] = taskItem.Description;
1718 row["creationDate"] = taskItem.CreationDate; 1718 row["creationDate"] = taskItem.CreationDate;
1719 row["creatorID"] = taskItem.CreatorID.ToString(); 1719 row["creatorID"] = taskItem.CreatorIdentification.ToString();
1720 row["ownerID"] = taskItem.OwnerID.ToString(); 1720 row["ownerID"] = taskItem.OwnerID.ToString();
1721 row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); 1721 row["lastOwnerID"] = taskItem.LastOwnerID.ToString();
1722 row["groupID"] = taskItem.GroupID.ToString(); 1722 row["groupID"] = taskItem.GroupID.ToString();
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs
index 726703b..8ca48f9 100644
--- a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Data.SQLiteLegacy
150 item.InvType = Convert.ToInt32(row["invType"]); 150 item.InvType = Convert.ToInt32(row["invType"]);
151 item.Folder = new UUID((string) row["parentFolderID"]); 151 item.Folder = new UUID((string) row["parentFolderID"]);
152 item.Owner = new UUID((string) row["avatarID"]); 152 item.Owner = new UUID((string) row["avatarID"]);
153 item.CreatorId = (string)row["creatorsID"]; 153 item.CreatorIdentification = (string)row["creatorsID"];
154 item.Name = (string) row["inventoryName"]; 154 item.Name = (string) row["inventoryName"];
155 item.Description = (string) row["inventoryDescription"]; 155 item.Description = (string) row["inventoryDescription"];
156 156
@@ -195,7 +195,7 @@ namespace OpenSim.Data.SQLiteLegacy
195 row["invType"] = item.InvType; 195 row["invType"] = item.InvType;
196 row["parentFolderID"] = item.Folder.ToString(); 196 row["parentFolderID"] = item.Folder.ToString();
197 row["avatarID"] = item.Owner.ToString(); 197 row["avatarID"] = item.Owner.ToString();
198 row["creatorsID"] = item.CreatorId.ToString(); 198 row["creatorsID"] = item.CreatorIdentification.ToString();
199 row["inventoryName"] = item.Name; 199 row["inventoryName"] = item.Name;
200 row["inventoryDescription"] = item.Description; 200 row["inventoryDescription"] = item.Description;
201 201
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
index bcc1006..1ad1e66 100644
--- a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
@@ -1334,7 +1334,7 @@ namespace OpenSim.Data.SQLiteLegacy
1334 taskItem.Name = (String)row["name"]; 1334 taskItem.Name = (String)row["name"];
1335 taskItem.Description = (String)row["description"]; 1335 taskItem.Description = (String)row["description"];
1336 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1336 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1337 taskItem.CreatorID = new UUID((String)row["creatorID"]); 1337 taskItem.CreatorIdentification = (String)row["creatorID"];
1338 taskItem.OwnerID = new UUID((String)row["ownerID"]); 1338 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1339 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); 1339 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1340 taskItem.GroupID = new UUID((String)row["groupID"]); 1340 taskItem.GroupID = new UUID((String)row["groupID"]);
@@ -1664,7 +1664,7 @@ namespace OpenSim.Data.SQLiteLegacy
1664 row["name"] = taskItem.Name; 1664 row["name"] = taskItem.Name;
1665 row["description"] = taskItem.Description; 1665 row["description"] = taskItem.Description;
1666 row["creationDate"] = taskItem.CreationDate; 1666 row["creationDate"] = taskItem.CreationDate;
1667 row["creatorID"] = taskItem.CreatorID.ToString(); 1667 row["creatorID"] = taskItem.CreatorIdentification.ToString();
1668 row["ownerID"] = taskItem.OwnerID.ToString(); 1668 row["ownerID"] = taskItem.OwnerID.ToString();
1669 row["lastOwnerID"] = taskItem.LastOwnerID.ToString(); 1669 row["lastOwnerID"] = taskItem.LastOwnerID.ToString();
1670 row["groupID"] = taskItem.GroupID.ToString(); 1670 row["groupID"] = taskItem.GroupID.ToString();
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>
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index df5b936..30d775c 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -102,6 +102,7 @@ namespace OpenSim.Framework
102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; 102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
103 private uint _creationDate = 0; 103 private uint _creationDate = 0;
104 private UUID _creatorID = UUID.Zero; 104 private UUID _creatorID = UUID.Zero;
105 private string _creatorData = String.Empty;
105 private string _description = String.Empty; 106 private string _description = String.Empty;
106 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; 107 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL;
107 private uint _flags = 0; 108 private uint _flags = 0;
@@ -160,6 +161,61 @@ namespace OpenSim.Framework
160 } 161 }
161 } 162 }
162 163
164 public string CreatorData // = <profile url>;<name>
165 {
166 get { return _creatorData; }
167 set { _creatorData = value; }
168 }
169
170 /// <summary>
171 /// Used by the DB layer to retrieve / store the entire user identification.
172 /// The identification can either be a simple UUID or a string of the form
173 /// uuid[;profile_url[;name]]
174 /// </summary>
175 public string CreatorIdentification
176 {
177 get
178 {
179 if (_creatorData != null && _creatorData != string.Empty)
180 return _creatorID.ToString() + ';' + _creatorData;
181 else
182 return _creatorID.ToString();
183 }
184 set
185 {
186 if ((value == null) || (value != null && value == string.Empty))
187 {
188 _creatorData = string.Empty;
189 return;
190 }
191
192 if (!value.Contains(";")) // plain UUID
193 {
194 UUID uuid = UUID.Zero;
195 UUID.TryParse(value, out uuid);
196 _creatorID = uuid;
197 }
198 else // <uuid>[;<endpoint>[;name]]
199 {
200 string name = "Unknown User";
201 string[] parts = value.Split(';');
202 if (parts.Length >= 1)
203 {
204 UUID uuid = UUID.Zero;
205 UUID.TryParse(parts[0], out uuid);
206 _creatorID = uuid;
207 }
208 if (parts.Length >= 2)
209 _creatorData = parts[1];
210 if (parts.Length >= 3)
211 name = parts[2];
212
213 _creatorData += ';' + name;
214
215 }
216 }
217 }
218
163 public string Description { 219 public string Description {
164 get { 220 get {
165 return _description; 221 return _description;
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index ef21834..67732ff 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -370,6 +370,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
370 370
371 item = new InventoryItemBase(); 371 item = new InventoryItemBase();
372 item.CreatorId = objectGroup.RootPart.CreatorID.ToString(); 372 item.CreatorId = objectGroup.RootPart.CreatorID.ToString();
373 item.CreatorData = objectGroup.RootPart.CreatorData;
373 item.ID = UUID.Random(); 374 item.ID = UUID.Random();
374 item.InvType = (int)InventoryType.Object; 375 item.InvType = (int)InventoryType.Object;
375 item.Folder = folder.ID; 376 item.Folder = folder.ID;
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 88ed763..0d94baa 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -164,7 +164,11 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
164 AddUser(sog.RootPart.CreatorID, sog.RootPart.CreatorData); 164 AddUser(sog.RootPart.CreatorID, sog.RootPart.CreatorData);
165 165
166 foreach (SceneObjectPart sop in sog.Parts) 166 foreach (SceneObjectPart sop in sog.Parts)
167 {
167 AddUser(sop.CreatorID, sop.CreatorData); 168 AddUser(sop.CreatorID, sop.CreatorData);
169 foreach (TaskInventoryItem item in sop.TaskInventory.Values)
170 AddUser(item.CreatorID, item.CreatorData);
171 }
168 } 172 }
169 173
170 174
@@ -226,40 +230,49 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
226 UserData user = new UserData(); 230 UserData user = new UserData();
227 user.Id = id; 231 user.Id = id;
228 232
229 if (creatorData != null && creatorData != string.Empty) 233 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id);
230 {
231 //creatorData = <endpoint>;<name>
232 234
233 string[] parts = creatorData.Split(';'); 235 if (account != null)
234 if (parts.Length >= 1)
235 {
236 user.ProfileURL = parts[0];
237 try
238 {
239 Uri uri = new Uri(parts[0]);
240 user.LastName = "@" + uri.Authority;
241 }
242 catch
243 {
244 m_log.DebugFormat("[SCENE]: Unable to parse Uri {0}", parts[0]);
245 user.LastName = "@unknown";
246 }
247 }
248 if (parts.Length >= 2)
249 user.FirstName = parts[1].Replace(' ', '.');
250 }
251 else
252 { 236 {
253 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id);
254 user.FirstName = account.FirstName; 237 user.FirstName = account.FirstName;
255 user.LastName = account.LastName; 238 user.LastName = account.LastName;
256 // user.ProfileURL = we should initialize this to the default 239 // user.ProfileURL = we should initialize this to the default
257 } 240 }
241 else
242 {
243 if (creatorData != null && creatorData != string.Empty)
244 {
245 //creatorData = <endpoint>;<name>
246
247 string[] parts = creatorData.Split(';');
248 if (parts.Length >= 1)
249 {
250 user.ProfileURL = parts[0];
251 try
252 {
253 Uri uri = new Uri(parts[0]);
254 user.LastName = "@" + uri.Authority;
255 }
256 catch
257 {
258 m_log.DebugFormat("[SCENE]: Unable to parse Uri {0}", parts[0]);
259 user.LastName = "@unknown";
260 }
261 }
262 if (parts.Length >= 2)
263 user.FirstName = parts[1].Replace(' ', '.');
264 }
265 else
266 {
267 user.FirstName = "Unknown";
268 user.LastName = "User";
269 }
270 }
258 271
259 lock (m_UserCache) 272 lock (m_UserCache)
260 m_UserCache[id] = user; 273 m_UserCache[id] = user;
261 274
262 //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.ProfileURL); 275 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.ProfileURL);
263 } 276 }
264 277
265 //public void AddUser(UUID uuid, string userData) 278 //public void AddUser(UUID uuid, string userData)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index ab6be50..c7244c8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -49,6 +49,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
49 49
50 private IInventoryService m_InventoryService; 50 private IInventoryService m_InventoryService;
51 51
52 private Scene m_Scene;
53
54 private IUserManagement m_UserManager;
55 private IUserManagement UserManager
56 {
57 get
58 {
59 if (m_UserManager == null)
60 {
61 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
62 }
63 return m_UserManager;
64 }
65 }
66
52 private bool m_Enabled = false; 67 private bool m_Enabled = false;
53 68
54 public Type ReplaceableInterface 69 public Type ReplaceableInterface
@@ -115,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
115 return; 130 return;
116 131
117 scene.RegisterModuleInterface<IInventoryService>(this); 132 scene.RegisterModuleInterface<IInventoryService>(this);
133
134 if (m_Scene == null)
135 m_Scene = scene;
118 } 136 }
119 137
120 public void RemoveRegion(Scene scene) 138 public void RemoveRegion(Scene scene)
@@ -163,7 +181,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
163 181
164 public InventoryCollection GetFolderContent(UUID userID, UUID folderID) 182 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
165 { 183 {
166 return m_InventoryService.GetFolderContent(userID, folderID); 184 InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID);
185 if (UserManager != null)
186 foreach (InventoryItemBase item in invCol.Items)
187 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
188
189 return invCol;
167 } 190 }
168 191
169 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) 192 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
index 17d80c7..9213132 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
@@ -47,9 +47,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 private bool m_Initialized = false; 49 private bool m_Initialized = false;
50// private Scene m_Scene; 50 private Scene m_Scene;
51 private InventoryServicesConnector m_RemoteConnector; 51 private InventoryServicesConnector m_RemoteConnector;
52 52
53 private IUserManagement m_UserManager;
54 private IUserManagement UserManager
55 {
56 get
57 {
58 if (m_UserManager == null)
59 {
60 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
61 }
62 return m_UserManager;
63 }
64 }
65
66
53 public Type ReplaceableInterface 67 public Type ReplaceableInterface
54 { 68 {
55 get { return null; } 69 get { return null; }
@@ -116,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
116 130
117 scene.RegisterModuleInterface<IInventoryService>(this); 131 scene.RegisterModuleInterface<IInventoryService>(this);
118 m_cache.AddRegion(scene); 132 m_cache.AddRegion(scene);
133
134 if (m_Scene == null)
135 m_Scene = scene;
119 } 136 }
120 137
121 public void RemoveRegion(Scene scene) 138 public void RemoveRegion(Scene scene)
@@ -186,7 +203,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
186 UUID sessionID = GetSessionID(userID); 203 UUID sessionID = GetSessionID(userID);
187 try 204 try
188 { 205 {
189 return m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); 206 InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID);
207 foreach (InventoryItemBase item in invCol.Items)
208 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
209 return invCol;
190 } 210 }
191 catch (Exception e) 211 catch (Exception e)
192 { 212 {
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index b7fa799..3238a81 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -269,7 +269,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
269 if (!ResolveUserUuid(part.CreatorID)) 269 if (!ResolveUserUuid(part.CreatorID))
270 part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; 270 part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
271 } 271 }
272 UserManager.AddUser(part.CreatorID, part.CreatorData); 272 if (UserManager != null)
273 UserManager.AddUser(part.CreatorID, part.CreatorData);
273 274
274 if (!ResolveUserUuid(part.OwnerID)) 275 if (!ResolveUserUuid(part.OwnerID))
275 part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 276 part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
@@ -293,10 +294,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
293 { 294 {
294 kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 295 kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
295 } 296 }
296 if (!ResolveUserUuid(kvp.Value.CreatorID)) 297 if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty)
297 { 298 {
298 kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; 299 if (!ResolveUserUuid(kvp.Value.CreatorID))
300 kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
299 } 301 }
302 if (UserManager != null)
303 UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
300 } 304 }
301 } 305 }
302 } 306 }
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index c06ccb2..568ba19 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -189,6 +189,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
189 189
190 InventoryItemBase item = new InventoryItemBase(); 190 InventoryItemBase item = new InventoryItemBase();
191 item.CreatorId = part.CreatorID.ToString(); 191 item.CreatorId = part.CreatorID.ToString();
192 item.CreatorData = part.CreatorData;
192 193
193 item.ID = UUID.Random(); 194 item.ID = UUID.Random();
194 item.Owner = remoteClient.AgentId; 195 item.Owner = remoteClient.AgentId;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 4cc797b..a29b7f1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -426,6 +426,7 @@ namespace OpenSim.Region.Framework.Scenes
426 InventoryItemBase itemCopy = new InventoryItemBase(); 426 InventoryItemBase itemCopy = new InventoryItemBase();
427 itemCopy.Owner = recipient; 427 itemCopy.Owner = recipient;
428 itemCopy.CreatorId = item.CreatorId; 428 itemCopy.CreatorId = item.CreatorId;
429 itemCopy.CreatorData = item.CreatorData;
429 itemCopy.ID = UUID.Random(); 430 itemCopy.ID = UUID.Random();
430 itemCopy.AssetID = item.AssetID; 431 itemCopy.AssetID = item.AssetID;
431 itemCopy.Description = item.Description; 432 itemCopy.Description = item.Description;
@@ -699,13 +700,13 @@ namespace OpenSim.Region.Framework.Scenes
699 if (remoteClient.AgentId == oldAgentID) 700 if (remoteClient.AgentId == oldAgentID)
700 { 701 {
701 CreateNewInventoryItem( 702 CreateNewInventoryItem(
702 remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 703 remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
703 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); 704 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
704 } 705 }
705 else 706 else
706 { 707 {
707 CreateNewInventoryItem( 708 CreateNewInventoryItem(
708 remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 709 remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
709 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); 710 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
710 } 711 }
711 } 712 }
@@ -755,11 +756,11 @@ namespace OpenSim.Region.Framework.Scenes
755 /// <param name="asset"></param> 756 /// <param name="asset"></param>
756 /// <param name="invType"></param> 757 /// <param name="invType"></param>
757 /// <param name="nextOwnerMask"></param> 758 /// <param name="nextOwnerMask"></param>
758 private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, 759 private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID,
759 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) 760 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
760 { 761 {
761 CreateNewInventoryItem( 762 CreateNewInventoryItem(
762 remoteClient, creatorID, folderID, name, flags, callbackID, asset, invType, 763 remoteClient, creatorID, creatorData, folderID, name, flags, callbackID, asset, invType,
763 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); 764 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
764 } 765 }
765 766
@@ -774,12 +775,13 @@ namespace OpenSim.Region.Framework.Scenes
774 /// <param name="nextOwnerMask"></param> 775 /// <param name="nextOwnerMask"></param>
775 /// <param name="creationDate"></param> 776 /// <param name="creationDate"></param>
776 private void CreateNewInventoryItem( 777 private void CreateNewInventoryItem(
777 IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 778 IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
778 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) 779 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
779 { 780 {
780 InventoryItemBase item = new InventoryItemBase(); 781 InventoryItemBase item = new InventoryItemBase();
781 item.Owner = remoteClient.AgentId; 782 item.Owner = remoteClient.AgentId;
782 item.CreatorId = creatorID; 783 item.CreatorId = creatorID;
784 item.CreatorData = creatorData;
783 item.ID = UUID.Random(); 785 item.ID = UUID.Random();
784 item.AssetID = asset.FullID; 786 item.AssetID = asset.FullID;
785 item.Description = asset.Description; 787 item.Description = asset.Description;
@@ -859,7 +861,7 @@ namespace OpenSim.Region.Framework.Scenes
859 AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); 861 AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId);
860 AssetService.Store(asset); 862 AssetService.Store(asset);
861 863
862 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); 864 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
863 } 865 }
864 else 866 else
865 { 867 {
@@ -901,7 +903,7 @@ namespace OpenSim.Region.Framework.Scenes
901 asset.Description = description; 903 asset.Description = description;
902 904
903 CreateNewInventoryItem( 905 CreateNewInventoryItem(
904 remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, 906 remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType,
905 (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, 907 (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All,
906 (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); 908 (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch());
907 } 909 }
@@ -1025,6 +1027,7 @@ namespace OpenSim.Region.Framework.Scenes
1025 1027
1026 agentItem.ID = UUID.Random(); 1028 agentItem.ID = UUID.Random();
1027 agentItem.CreatorId = taskItem.CreatorID.ToString(); 1029 agentItem.CreatorId = taskItem.CreatorID.ToString();
1030 agentItem.CreatorData = taskItem.CreatorData;
1028 agentItem.Owner = destAgent; 1031 agentItem.Owner = destAgent;
1029 agentItem.AssetID = taskItem.AssetID; 1032 agentItem.AssetID = taskItem.AssetID;
1030 agentItem.Description = taskItem.Description; 1033 agentItem.Description = taskItem.Description;
@@ -1226,6 +1229,7 @@ namespace OpenSim.Region.Framework.Scenes
1226 1229
1227 destTaskItem.ItemID = UUID.Random(); 1230 destTaskItem.ItemID = UUID.Random();
1228 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1231 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1232 destTaskItem.CreatorData = srcTaskItem.CreatorData;
1229 destTaskItem.AssetID = srcTaskItem.AssetID; 1233 destTaskItem.AssetID = srcTaskItem.AssetID;
1230 destTaskItem.GroupID = destPart.GroupID; 1234 destTaskItem.GroupID = destPart.GroupID;
1231 destTaskItem.OwnerID = destPart.OwnerID; 1235 destTaskItem.OwnerID = destPart.OwnerID;
@@ -1638,6 +1642,7 @@ namespace OpenSim.Region.Framework.Scenes
1638 1642
1639 destTaskItem.ItemID = UUID.Random(); 1643 destTaskItem.ItemID = UUID.Random();
1640 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1644 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1645 destTaskItem.CreatorData = srcTaskItem.CreatorData;
1641 destTaskItem.AssetID = srcTaskItem.AssetID; 1646 destTaskItem.AssetID = srcTaskItem.AssetID;
1642 destTaskItem.GroupID = destPart.GroupID; 1647 destTaskItem.GroupID = destPart.GroupID;
1643 destTaskItem.OwnerID = destPart.OwnerID; 1648 destTaskItem.OwnerID = destPart.OwnerID;
@@ -1844,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes
1844 1849
1845 InventoryItemBase item = new InventoryItemBase(); 1850 InventoryItemBase item = new InventoryItemBase();
1846 item.CreatorId = grp.RootPart.CreatorID.ToString(); 1851 item.CreatorId = grp.RootPart.CreatorID.ToString();
1852 item.CreatorData = grp.RootPart.CreatorData;
1847 item.Owner = remoteClient.AgentId; 1853 item.Owner = remoteClient.AgentId;
1848 item.ID = UUID.Random(); 1854 item.ID = UUID.Random();
1849 item.AssetID = asset.FullID; 1855 item.AssetID = asset.FullID;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6d5a53a..2155e26 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -449,12 +449,17 @@ namespace OpenSim.Region.Framework.Scenes
449 } 449 }
450 } 450 }
451 451
452 public string CreatorData 452 public string CreatorData // = <profile url>;<name>
453 { 453 {
454 get { return m_creatorData; } 454 get { return m_creatorData; }
455 set { m_creatorData = value; } 455 set { m_creatorData = value; }
456 } 456 }
457 457
458 /// <summary>
459 /// Used by the DB layer to retrieve / store the entire user identification.
460 /// The identification can either be a simple UUID or a string of the form
461 /// uuid[;profile_url[;name]]
462 /// </summary>
458 public string CreatorIdentification 463 public string CreatorIdentification
459 { 464 {
460 get 465 get
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index fceeafa..9cf5a39 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -331,6 +331,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
331 m_TaskInventoryXmlProcessors.Add("BasePermissions", ProcessTIBasePermissions); 331 m_TaskInventoryXmlProcessors.Add("BasePermissions", ProcessTIBasePermissions);
332 m_TaskInventoryXmlProcessors.Add("CreationDate", ProcessTICreationDate); 332 m_TaskInventoryXmlProcessors.Add("CreationDate", ProcessTICreationDate);
333 m_TaskInventoryXmlProcessors.Add("CreatorID", ProcessTICreatorID); 333 m_TaskInventoryXmlProcessors.Add("CreatorID", ProcessTICreatorID);
334 m_TaskInventoryXmlProcessors.Add("CreatorData", ProcessTICreatorData);
334 m_TaskInventoryXmlProcessors.Add("Description", ProcessTIDescription); 335 m_TaskInventoryXmlProcessors.Add("Description", ProcessTIDescription);
335 m_TaskInventoryXmlProcessors.Add("EveryonePermissions", ProcessTIEveryonePermissions); 336 m_TaskInventoryXmlProcessors.Add("EveryonePermissions", ProcessTIEveryonePermissions);
336 m_TaskInventoryXmlProcessors.Add("Flags", ProcessTIFlags); 337 m_TaskInventoryXmlProcessors.Add("Flags", ProcessTIFlags);
@@ -707,6 +708,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
707 item.CreatorID = ReadUUID(reader, "CreatorID"); 708 item.CreatorID = ReadUUID(reader, "CreatorID");
708 } 709 }
709 710
711 private static void ProcessTICreatorData(TaskInventoryItem item, XmlTextReader reader)
712 {
713 item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty);
714 }
715
710 private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) 716 private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader)
711 { 717 {
712 item.Description = reader.ReadElementContentAsString("Description", String.Empty); 718 item.Description = reader.ReadElementContentAsString("Description", String.Empty);
@@ -1102,7 +1108,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1102 WriteUUID(writer, "FolderID", sop.FolderID, options); 1108 WriteUUID(writer, "FolderID", sop.FolderID, options);
1103 writer.WriteElementString("InventorySerial", sop.InventorySerial.ToString()); 1109 writer.WriteElementString("InventorySerial", sop.InventorySerial.ToString());
1104 1110
1105 WriteTaskInventory(writer, sop.TaskInventory, options); 1111 WriteTaskInventory(writer, sop.TaskInventory, options, sop.ParentGroup.Scene);
1106 1112
1107 WriteUUID(writer, "UUID", sop.UUID, options); 1113 WriteUUID(writer, "UUID", sop.UUID, options);
1108 writer.WriteElementString("LocalId", sop.LocalId.ToString()); 1114 writer.WriteElementString("LocalId", sop.LocalId.ToString());
@@ -1226,7 +1232,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1226 writer.WriteElementString(name, flagsStr); 1232 writer.WriteElementString(name, flagsStr);
1227 } 1233 }
1228 1234
1229 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) 1235 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene)
1230 { 1236 {
1231 if (tinv.Count > 0) // otherwise skip this 1237 if (tinv.Count > 0) // otherwise skip this
1232 { 1238 {
@@ -1239,7 +1245,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1239 WriteUUID(writer, "AssetID", item.AssetID, options); 1245 WriteUUID(writer, "AssetID", item.AssetID, options);
1240 writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); 1246 writer.WriteElementString("BasePermissions", item.BasePermissions.ToString());
1241 writer.WriteElementString("CreationDate", item.CreationDate.ToString()); 1247 writer.WriteElementString("CreationDate", item.CreationDate.ToString());
1248
1249
1242 WriteUUID(writer, "CreatorID", item.CreatorID, options); 1250 WriteUUID(writer, "CreatorID", item.CreatorID, options);
1251
1252 if (item.CreatorData != null && item.CreatorData != string.Empty)
1253 writer.WriteElementString("CreatorData", item.CreatorData);
1254 else if (options.ContainsKey("profile"))
1255 {
1256 if (m_UserManagement == null)
1257 m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
1258 string name = m_UserManagement.GetUserName(item.CreatorID);
1259 writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + item.CreatorID + ";" + name);
1260 }
1261
1243 writer.WriteElementString("Description", item.Description); 1262 writer.WriteElementString("Description", item.Description);
1244 writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString()); 1263 writer.WriteElementString("EveryonePermissions", item.EveryonePermissions.ToString());
1245 writer.WriteElementString("Flags", item.Flags.ToString()); 1264 writer.WriteElementString("Flags", item.Flags.ToString());
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index ac6a3ab..23ae5b4 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -601,6 +601,7 @@ namespace OpenSim.Server.Handlers.Asset
601 ret["BasePermissions"] = item.BasePermissions.ToString(); 601 ret["BasePermissions"] = item.BasePermissions.ToString();
602 ret["CreationDate"] = item.CreationDate.ToString(); 602 ret["CreationDate"] = item.CreationDate.ToString();
603 ret["CreatorId"] = item.CreatorId.ToString(); 603 ret["CreatorId"] = item.CreatorId.ToString();
604 ret["CreatorData"] = item.CreatorData.ToString();
604 ret["CurrentPermissions"] = item.CurrentPermissions.ToString(); 605 ret["CurrentPermissions"] = item.CurrentPermissions.ToString();
605 ret["Description"] = item.Description.ToString(); 606 ret["Description"] = item.Description.ToString();
606 ret["EveryOnePermissions"] = item.EveryOnePermissions.ToString(); 607 ret["EveryOnePermissions"] = item.EveryOnePermissions.ToString();
@@ -646,6 +647,7 @@ namespace OpenSim.Server.Handlers.Asset
646 item.InvType = int.Parse(data["InvType"].ToString()); 647 item.InvType = int.Parse(data["InvType"].ToString());
647 item.Folder = new UUID(data["Folder"].ToString()); 648 item.Folder = new UUID(data["Folder"].ToString());
648 item.CreatorId = data["CreatorId"].ToString(); 649 item.CreatorId = data["CreatorId"].ToString();
650 item.CreatorData = data["CreatorData"].ToString();
649 item.Description = data["Description"].ToString(); 651 item.Description = data["Description"].ToString();
650 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); 652 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString());
651 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); 653 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString());
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index 403ee15..88fbda3 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -312,6 +312,7 @@ namespace OpenSim.Services.Connectors
312 { "InvType", item.InvType.ToString() }, 312 { "InvType", item.InvType.ToString() },
313 { "Folder", item.Folder.ToString() }, 313 { "Folder", item.Folder.ToString() },
314 { "CreatorId", item.CreatorId.ToString() }, 314 { "CreatorId", item.CreatorId.ToString() },
315 { "CreatorData", item.CreatorData.ToString() },
315 { "Description", item.Description.ToString() }, 316 { "Description", item.Description.ToString() },
316 { "NextPermissions", item.NextPermissions.ToString() }, 317 { "NextPermissions", item.NextPermissions.ToString() },
317 { "CurrentPermissions", item.CurrentPermissions.ToString() }, 318 { "CurrentPermissions", item.CurrentPermissions.ToString() },
@@ -344,6 +345,7 @@ namespace OpenSim.Services.Connectors
344 { "InvType", item.InvType.ToString() }, 345 { "InvType", item.InvType.ToString() },
345 { "Folder", item.Folder.ToString() }, 346 { "Folder", item.Folder.ToString() },
346 { "CreatorId", item.CreatorId.ToString() }, 347 { "CreatorId", item.CreatorId.ToString() },
348 { "CreatorData", item.CreatorData.ToString() },
347 { "Description", item.Description.ToString() }, 349 { "Description", item.Description.ToString() },
348 { "NextPermissions", item.NextPermissions.ToString() }, 350 { "NextPermissions", item.NextPermissions.ToString() },
349 { "CurrentPermissions", item.CurrentPermissions.ToString() }, 351 { "CurrentPermissions", item.CurrentPermissions.ToString() },
@@ -556,6 +558,7 @@ namespace OpenSim.Services.Connectors
556 item.InvType = int.Parse(data["InvType"].ToString()); 558 item.InvType = int.Parse(data["InvType"].ToString());
557 item.Folder = new UUID(data["Folder"].ToString()); 559 item.Folder = new UUID(data["Folder"].ToString());
558 item.CreatorId = data["CreatorId"].ToString(); 560 item.CreatorId = data["CreatorId"].ToString();
561 item.CreatorData = data["CreatorData"].ToString();
559 item.Description = data["Description"].ToString(); 562 item.Description = data["Description"].ToString();
560 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); 563 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString());
561 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); 564 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString());
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 21ad4ab..61f3fbe 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -612,6 +612,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
612 { "Name", item.Name }, 612 { "Name", item.Name },
613 { "Description", item.Description }, 613 { "Description", item.Description },
614 { "CreatorID", item.CreatorId }, 614 { "CreatorID", item.CreatorId },
615 { "CreatorData", item.CreatorData },
615 { "ContentType", invContentType }, 616 { "ContentType", invContentType },
616 { "ExtraData", OSDParser.SerializeJsonString(extraData) } 617 { "ExtraData", OSDParser.SerializeJsonString(extraData) }
617 }; 618 };
@@ -776,6 +777,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
776 invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString()); 777 invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString());
777 invItem.CreationDate = item["CreationDate"].AsInteger(); 778 invItem.CreationDate = item["CreationDate"].AsInteger();
778 invItem.CreatorId = item["CreatorID"].AsString(); 779 invItem.CreatorId = item["CreatorID"].AsString();
780 invItem.CreatorData = item["CreatorData"].AsString();
779 invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID(); 781 invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID();
780 invItem.Description = item["Description"].AsString(); 782 invItem.Description = item["Description"].AsString();
781 invItem.Folder = item["ParentID"].AsUUID(); 783 invItem.Folder = item["ParentID"].AsUUID();
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index fb395ec..e602412 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -524,7 +524,7 @@ namespace OpenSim.Services.InventoryService
524 newItem.ID = item.inventoryID; 524 newItem.ID = item.inventoryID;
525 newItem.InvType = item.invType; 525 newItem.InvType = item.invType;
526 newItem.Folder = item.parentFolderID; 526 newItem.Folder = item.parentFolderID;
527 newItem.CreatorId = item.creatorID; 527 newItem.CreatorIdentification = item.creatorID;
528 newItem.Description = item.inventoryDescription; 528 newItem.Description = item.inventoryDescription;
529 newItem.NextPermissions = (uint)item.inventoryNextPermissions; 529 newItem.NextPermissions = (uint)item.inventoryNextPermissions;
530 newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions; 530 newItem.CurrentPermissions = (uint)item.inventoryCurrentPermissions;
@@ -555,7 +555,7 @@ namespace OpenSim.Services.InventoryService
555 newItem.inventoryID = item.ID; 555 newItem.inventoryID = item.ID;
556 newItem.invType = item.InvType; 556 newItem.invType = item.InvType;
557 newItem.parentFolderID = item.Folder; 557 newItem.parentFolderID = item.Folder;
558 newItem.creatorID = item.CreatorId; 558 newItem.creatorID = item.CreatorIdentification;
559 newItem.inventoryDescription = item.Description; 559 newItem.inventoryDescription = item.Description;
560 newItem.inventoryNextPermissions = (int)item.NextPermissions; 560 newItem.inventoryNextPermissions = (int)item.NextPermissions;
561 newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions; 561 newItem.inventoryCurrentPermissions = (int)item.CurrentPermissions;