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 | |
parent | * Fix the remainder of the packets that require sessionId checks. (diff) | |
download | opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.zip opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.gz opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.bz2 opensim-SC_OLD-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')
21 files changed, 98 insertions, 75 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 95e3d71..f0d9946 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | |||
@@ -1293,7 +1293,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1293 | rdata.writer.WriteAttributeString("uuid", String.Empty, i.ID.ToString()); | 1293 | rdata.writer.WriteAttributeString("uuid", String.Empty, i.ID.ToString()); |
1294 | rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString()); | 1294 | rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString()); |
1295 | rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString()); | 1295 | rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString()); |
1296 | rdata.writer.WriteAttributeString("creator", String.Empty, i.Creator.ToString()); | 1296 | rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId); |
1297 | rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString()); | 1297 | rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString()); |
1298 | rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString()); | 1298 | rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString()); |
1299 | rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString()); | 1299 | rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString()); |
@@ -1392,7 +1392,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1392 | || newf.Folder != oldf.Folder | 1392 | || newf.Folder != oldf.Folder |
1393 | || newf.Description != oldf.Description | 1393 | || newf.Description != oldf.Description |
1394 | || newf.Owner != oldf.Owner | 1394 | || newf.Owner != oldf.Owner |
1395 | || newf.Creator != oldf.Creator | 1395 | || newf.CreatorId != oldf.CreatorId |
1396 | || newf.AssetID != oldf.AssetID | 1396 | || newf.AssetID != oldf.AssetID |
1397 | || newf.GroupID != oldf.GroupID | 1397 | || newf.GroupID != oldf.GroupID |
1398 | || newf.GroupOwned != oldf.GroupOwned | 1398 | || newf.GroupOwned != oldf.GroupOwned |
@@ -1676,7 +1676,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1676 | result.ID = UUID.Zero; | 1676 | result.ID = UUID.Zero; |
1677 | result.Folder = UUID.Zero; | 1677 | result.Folder = UUID.Zero; |
1678 | result.Owner = ic.UserID; | 1678 | result.Owner = ic.UserID; |
1679 | result.Creator = ic.UserID; | 1679 | result.CreatorId = ic.UserID.ToString(); |
1680 | result.AssetID = UUID.Zero; | 1680 | result.AssetID = UUID.Zero; |
1681 | result.GroupID = UUID.Zero; | 1681 | result.GroupID = UUID.Zero; |
1682 | result.GroupOwned = false; | 1682 | result.GroupOwned = false; |
@@ -1710,7 +1710,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1710 | result.InvType = Int32.Parse(ic.xml.Value); | 1710 | result.InvType = Int32.Parse(ic.xml.Value); |
1711 | break; | 1711 | break; |
1712 | case "creator": | 1712 | case "creator": |
1713 | result.Creator = new UUID(ic.xml.Value); | 1713 | result.CreatorId = ic.xml.Value; |
1714 | break; | 1714 | break; |
1715 | case "assettype": | 1715 | case "assettype": |
1716 | result.AssetType = Int32.Parse(ic.xml.Value); | 1716 | result.AssetType = Int32.Parse(ic.xml.Value); |
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index fe8287d..6a4fbab 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL | |||
181 | } | 181 | } |
182 | } | 182 | } |
183 | } | 183 | } |
184 | m_log.InfoFormat("[INVENTORY DB] : FOund no inventory folder with ID : {0}", folderID); | 184 | m_log.InfoFormat("[INVENTORY DB] : Found no inventory folder with ID : {0}", folderID); |
185 | return null; | 185 | return null; |
186 | } | 186 | } |
187 | 187 | ||
@@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL | |||
244 | } | 244 | } |
245 | catch (Exception e) | 245 | catch (Exception e) |
246 | { | 246 | { |
247 | m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); | 247 | m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message); |
248 | } | 248 | } |
249 | } | 249 | } |
250 | } | 250 | } |
@@ -277,7 +277,7 @@ namespace OpenSim.Data.MSSQL | |||
277 | } | 277 | } |
278 | catch (Exception e) | 278 | catch (Exception e) |
279 | { | 279 | { |
280 | m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); | 280 | m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message); |
281 | } | 281 | } |
282 | } | 282 | } |
283 | } | 283 | } |
@@ -300,7 +300,7 @@ namespace OpenSim.Data.MSSQL | |||
300 | } | 300 | } |
301 | catch (Exception e) | 301 | catch (Exception e) |
302 | { | 302 | { |
303 | m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); | 303 | m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message); |
304 | } | 304 | } |
305 | } | 305 | } |
306 | } | 306 | } |
@@ -385,7 +385,8 @@ namespace OpenSim.Data.MSSQL | |||
385 | } | 385 | } |
386 | } | 386 | } |
387 | } | 387 | } |
388 | m_log.InfoFormat("[INVENTORY DB] : Found no inventory item with ID : {0}", itemID); | 388 | |
389 | m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID); | ||
389 | return null; | 390 | return null; |
390 | } | 391 | } |
391 | 392 | ||
@@ -424,7 +425,7 @@ namespace OpenSim.Data.MSSQL | |||
424 | command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); | 425 | command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); |
425 | command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); | 426 | command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); |
426 | command.Parameters.Add(database.CreateParameter("invType", item.InvType)); | 427 | command.Parameters.Add(database.CreateParameter("invType", item.InvType)); |
427 | command.Parameters.Add(database.CreateParameter("creatorID", item.Creator)); | 428 | command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorId)); |
428 | command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); | 429 | command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); |
429 | command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); | 430 | command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); |
430 | command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions)); | 431 | command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions)); |
@@ -441,7 +442,7 @@ namespace OpenSim.Data.MSSQL | |||
441 | } | 442 | } |
442 | catch (Exception e) | 443 | catch (Exception e) |
443 | { | 444 | { |
444 | m_log.Error("[INVENTORY DB] Error inserting item :" + e.Message); | 445 | m_log.Error("[INVENTORY DB]: Error inserting item :" + e.Message); |
445 | } | 446 | } |
446 | } | 447 | } |
447 | 448 | ||
@@ -498,7 +499,7 @@ namespace OpenSim.Data.MSSQL | |||
498 | command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); | 499 | command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); |
499 | command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); | 500 | command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); |
500 | command.Parameters.Add(database.CreateParameter("invType", item.InvType)); | 501 | command.Parameters.Add(database.CreateParameter("invType", item.InvType)); |
501 | command.Parameters.Add(database.CreateParameter("creatorID", item.Creator)); | 502 | command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorIdAsUuid)); |
502 | command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); | 503 | command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); |
503 | command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); | 504 | command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); |
504 | command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice)); | 505 | command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice)); |
@@ -515,7 +516,7 @@ namespace OpenSim.Data.MSSQL | |||
515 | } | 516 | } |
516 | catch (Exception e) | 517 | catch (Exception e) |
517 | { | 518 | { |
518 | m_log.Error("[INVENTORY DB] Error updating item :" + e.Message); | 519 | m_log.Error("[INVENTORY DB]: Error updating item :" + e.Message); |
519 | } | 520 | } |
520 | } | 521 | } |
521 | } | 522 | } |
@@ -538,7 +539,7 @@ namespace OpenSim.Data.MSSQL | |||
538 | } | 539 | } |
539 | catch (Exception e) | 540 | catch (Exception e) |
540 | { | 541 | { |
541 | m_log.Error("[INVENTORY DB] Error deleting item :" + e.Message); | 542 | m_log.Error("[INVENTORY DB]: Error deleting item :" + e.Message); |
542 | } | 543 | } |
543 | } | 544 | } |
544 | } | 545 | } |
@@ -725,7 +726,7 @@ namespace OpenSim.Data.MSSQL | |||
725 | item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); | 726 | item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); |
726 | item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); | 727 | item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); |
727 | item.InvType = Convert.ToInt32(reader["invType"].ToString()); | 728 | item.InvType = Convert.ToInt32(reader["invType"].ToString()); |
728 | item.Creator = new UUID((Guid)reader["creatorID"]); | 729 | item.CreatorId = ((Guid)reader["creatorID"]).ToString(); |
729 | item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); | 730 | item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); |
730 | item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); | 731 | item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); |
731 | item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]); | 732 | item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]); |
@@ -740,7 +741,7 @@ namespace OpenSim.Data.MSSQL | |||
740 | } | 741 | } |
741 | catch (SqlException e) | 742 | catch (SqlException e) |
742 | { | 743 | { |
743 | m_log.Error("[INVENTORY DB] Error reading inventory item :" + e.Message); | 744 | m_log.Error("[INVENTORY DB]: Error reading inventory item :" + e.Message); |
744 | } | 745 | } |
745 | 746 | ||
746 | return null; | 747 | return null; |
@@ -764,7 +765,7 @@ namespace OpenSim.Data.MSSQL | |||
764 | } | 765 | } |
765 | catch (SqlException e) | 766 | catch (SqlException e) |
766 | { | 767 | { |
767 | m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message); | 768 | m_log.Error("[INVENTORY DB]: Error deleting folder :" + e.Message); |
768 | } | 769 | } |
769 | } | 770 | } |
770 | 771 | ||
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index a5312b5..7092096 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -306,22 +306,20 @@ namespace OpenSim.Data.MySQL | |||
306 | try | 306 | try |
307 | { | 307 | { |
308 | InventoryItemBase item = new InventoryItemBase(); | 308 | InventoryItemBase item = new InventoryItemBase(); |
309 | item.CreatorId = (string)reader["creatorID"]; | ||
310 | |||
309 | // Be a bit safer in parsing these because the | 311 | // Be a bit safer in parsing these because the |
310 | // database doesn't enforce them to be not null, and | 312 | // database doesn't enforce them to be not null, and |
311 | // the inventory still works if these are weird in the | 313 | // the inventory still works if these are weird in the |
312 | // db | 314 | // db |
313 | |||
314 | UUID Owner = UUID.Zero; | 315 | UUID Owner = UUID.Zero; |
315 | UUID Creator = UUID.Zero; | ||
316 | UUID GroupID = UUID.Zero; | 316 | UUID GroupID = UUID.Zero; |
317 | UUID.TryParse((string)reader["avatarID"], out Owner); | 317 | UUID.TryParse((string)reader["avatarID"], out Owner); |
318 | UUID.TryParse((string)reader["creatorID"], out Creator); | ||
319 | UUID.TryParse((string)reader["groupID"], out GroupID); | 318 | UUID.TryParse((string)reader["groupID"], out GroupID); |
320 | item.Owner = Owner; | 319 | item.Owner = Owner; |
321 | item.Creator = Creator; | ||
322 | item.GroupID = GroupID; | 320 | item.GroupID = GroupID; |
323 | 321 | ||
324 | // Rest of the parsing. If these UUID's fail, we're dead anyway | 322 | // Rest of the parsing. If these UUID's fail, we're dead anyway |
325 | item.ID = new UUID((string) reader["inventoryID"]); | 323 | item.ID = new UUID((string) reader["inventoryID"]); |
326 | item.AssetID = new UUID((string) reader["assetID"]); | 324 | item.AssetID = new UUID((string) reader["assetID"]); |
327 | item.AssetType = (int) reader["assetType"]; | 325 | item.AssetType = (int) reader["assetType"]; |
@@ -480,7 +478,7 @@ namespace OpenSim.Data.MySQL | |||
480 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", | 478 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", |
481 | item.CurrentPermissions.ToString()); | 479 | item.CurrentPermissions.ToString()); |
482 | result.Parameters.AddWithValue("?invType", item.InvType); | 480 | result.Parameters.AddWithValue("?invType", item.InvType); |
483 | result.Parameters.AddWithValue("?creatorID", item.Creator.ToString()); | 481 | result.Parameters.AddWithValue("?creatorID", item.CreatorId); |
484 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions); | 482 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions); |
485 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); | 483 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); |
486 | result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions); | 484 | result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions); |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index bd18c11..aedcd82 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -143,7 +143,7 @@ namespace OpenSim.Data.SQLite | |||
143 | item.InvType = Convert.ToInt32(row["invType"]); | 143 | item.InvType = Convert.ToInt32(row["invType"]); |
144 | item.Folder = new UUID((string) row["parentFolderID"]); | 144 | item.Folder = new UUID((string) row["parentFolderID"]); |
145 | item.Owner = new UUID((string) row["avatarID"]); | 145 | item.Owner = new UUID((string) row["avatarID"]); |
146 | item.Creator = new UUID((string) row["creatorsID"]); | 146 | item.CreatorId = (string)row["creatorsID"]; |
147 | item.Name = (string) row["inventoryName"]; | 147 | item.Name = (string) row["inventoryName"]; |
148 | item.Description = (string) row["inventoryDescription"]; | 148 | item.Description = (string) row["inventoryDescription"]; |
149 | 149 | ||
@@ -176,7 +176,7 @@ namespace OpenSim.Data.SQLite | |||
176 | } | 176 | } |
177 | 177 | ||
178 | /// <summary> | 178 | /// <summary> |
179 | /// | 179 | /// Fill a database row with item data |
180 | /// </summary> | 180 | /// </summary> |
181 | /// <param name="row"></param> | 181 | /// <param name="row"></param> |
182 | /// <param name="item"></param> | 182 | /// <param name="item"></param> |
@@ -188,7 +188,7 @@ namespace OpenSim.Data.SQLite | |||
188 | row["invType"] = item.InvType; | 188 | row["invType"] = item.InvType; |
189 | row["parentFolderID"] = Util.ToRawUuidString(item.Folder); | 189 | row["parentFolderID"] = Util.ToRawUuidString(item.Folder); |
190 | row["avatarID"] = Util.ToRawUuidString(item.Owner); | 190 | row["avatarID"] = Util.ToRawUuidString(item.Owner); |
191 | row["creatorsID"] = Util.ToRawUuidString(item.Creator); | 191 | row["creatorsID"] = Util.ToRawUuidString(item.CreatorIdAsUuid); |
192 | row["inventoryName"] = item.Name; | 192 | row["inventoryName"] = item.Name; |
193 | row["inventoryDescription"] = item.Description; | 193 | row["inventoryDescription"] = item.Description; |
194 | 194 | ||
@@ -281,7 +281,7 @@ namespace OpenSim.Data.SQLite | |||
281 | DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID)); | 281 | DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID)); |
282 | if (inventoryRow == null) | 282 | if (inventoryRow == null) |
283 | { | 283 | { |
284 | if (! add) | 284 | if (!add) |
285 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID); | 285 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID); |
286 | 286 | ||
287 | inventoryRow = inventoryItemTable.NewRow(); | 287 | inventoryRow = inventoryItemTable.NewRow(); |
diff --git a/OpenSim/Data/Tests/BasicInventoryTest.cs b/OpenSim/Data/Tests/BasicInventoryTest.cs index 65c61cd..eed6cab 100644 --- a/OpenSim/Data/Tests/BasicInventoryTest.cs +++ b/OpenSim/Data/Tests/BasicInventoryTest.cs | |||
@@ -271,7 +271,7 @@ namespace OpenSim.Data.Tests | |||
271 | i.ID = id; | 271 | i.ID = id; |
272 | i.Folder = parent; | 272 | i.Folder = parent; |
273 | i.Owner = owner; | 273 | i.Owner = owner; |
274 | i.Creator = owner; | 274 | i.CreatorId = owner.ToString(); |
275 | i.Name = name; | 275 | i.Name = name; |
276 | i.Description = name; | 276 | i.Description = name; |
277 | i.AssetID = asset; | 277 | i.AssetID = asset; |
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index e7ce8af..0e87c8c 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -606,7 +606,7 @@ namespace OpenSim.Data.Tests | |||
606 | UUID owner = UUID.Random(); | 606 | UUID owner = UUID.Random(); |
607 | i.Owner = owner; | 607 | i.Owner = owner; |
608 | UUID creator = UUID.Random(); | 608 | UUID creator = UUID.Random(); |
609 | i.Creator = creator; | 609 | i.CreatorId = creator.ToString(); |
610 | string name = RandomName(); | 610 | string name = RandomName(); |
611 | i.Name = name; | 611 | i.Name = name; |
612 | i.Description = name; | 612 | i.Description = name; |
@@ -982,7 +982,7 @@ namespace OpenSim.Data.Tests | |||
982 | i.ID = id; | 982 | i.ID = id; |
983 | i.Folder = parent; | 983 | i.Folder = parent; |
984 | i.Owner = owner; | 984 | i.Owner = owner; |
985 | i.Creator = owner; | 985 | i.CreatorId = owner.ToString(); |
986 | i.Name = name; | 986 | i.Name = name; |
987 | i.Description = name; | 987 | i.Description = name; |
988 | i.AssetID = asset; | 988 | i.AssetID = asset; |
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 |
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 | |||
216 | writer.WriteString(item.InvType.ToString()); | 216 | writer.WriteString(item.InvType.ToString()); |
217 | writer.WriteEndElement(); | 217 | writer.WriteEndElement(); |
218 | writer.WriteStartElement("CreatorUUID"); | 218 | writer.WriteStartElement("CreatorUUID"); |
219 | writer.WriteString(item.Creator.ToString()); | 219 | writer.WriteString(item.CreatorId); |
220 | writer.WriteEndElement(); | 220 | writer.WriteEndElement(); |
221 | writer.WriteStartElement("CreationDate"); | 221 | writer.WriteStartElement("CreationDate"); |
222 | writer.WriteString(item.CreationDate.ToString()); | 222 | 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 | |||
598 | { | 598 | { |
599 | InventoryItemBase item = new InventoryItemBase(); | 599 | InventoryItemBase item = new InventoryItemBase(); |
600 | 600 | ||
601 | |||
602 | try | 601 | try |
603 | { | 602 | { |
604 | using (XmlReader reader = XmlReader.Create(stream)) | 603 | using (XmlReader reader = XmlReader.Create(stream)) |
@@ -624,9 +623,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
624 | 623 | ||
625 | ReadUUID(reader, "Folder", out dummyUUID); | 624 | ReadUUID(reader, "Folder", out dummyUUID); |
626 | item.Folder = dummyUUID; | 625 | item.Folder = dummyUUID; |
627 | ReadUUID(reader, "Creator", out dummyUUID); | ||
628 | item.Creator = dummyUUID; | ||
629 | 626 | ||
627 | item.CreatorId = reader.ReadElementContentAsString("Creator", String.Empty); | ||
630 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); | 628 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); |
631 | 629 | ||
632 | uint dummyUInt; | 630 | uint dummyUInt; |
@@ -757,7 +755,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
757 | writer.WriteElementString("InvType", XmlConvert.ToString(item.InvType)); | 755 | writer.WriteElementString("InvType", XmlConvert.ToString(item.InvType)); |
758 | WriteUUID(writer, "Folder", item.Folder); | 756 | WriteUUID(writer, "Folder", item.Folder); |
759 | WriteUUID(writer, "Owner", item.Owner); | 757 | WriteUUID(writer, "Owner", item.Owner); |
760 | WriteUUID(writer, "Creator", item.Creator); | 758 | writer.WriteElementString("Creator", item.CreatorId); |
761 | writer.WriteElementString("Name", item.Name); | 759 | writer.WriteElementString("Name", item.Name); |
762 | writer.WriteElementString("Description", item.Description); | 760 | writer.WriteElementString("Description", item.Description); |
763 | writer.WriteElementString("NextPermissions", XmlConvert.ToString(item.NextPermissions)); | 761 | 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 | |||
515 | else if (Reader.LocalName == "Creator" && Reader.NamespaceURI == "" && !b13) | 515 | else if (Reader.LocalName == "Creator" && Reader.NamespaceURI == "" && !b13) |
516 | { | 516 | { |
517 | b13 = true; | 517 | b13 = true; |
518 | ob.@Creator = ReadObject_UUID(false, true); | 518 | ob.@CreatorId = Reader.ReadElementString(); |
519 | } | 519 | } |
520 | else if (Reader.LocalName == "Owner" && Reader.NamespaceURI == "" && !b12) | 520 | else if (Reader.LocalName == "Owner" && Reader.NamespaceURI == "" && !b12) |
521 | { | 521 | { |
@@ -876,7 +876,7 @@ namespace OpenSim.Grid.AssetInventoryServer | |||
876 | WriteElementString("InvType", "", ob.@InvType.ToString(CultureInfo.InvariantCulture)); | 876 | WriteElementString("InvType", "", ob.@InvType.ToString(CultureInfo.InvariantCulture)); |
877 | WriteObject_UUID(ob.@Folder, "Folder", "", false, false, true); | 877 | WriteObject_UUID(ob.@Folder, "Folder", "", false, false, true); |
878 | WriteObject_UUID(ob.@Owner, "Owner", "", false, false, true); | 878 | WriteObject_UUID(ob.@Owner, "Owner", "", false, false, true); |
879 | WriteObject_UUID(ob.@Creator, "Creator", "", false, false, true); | 879 | WriteElementString("Creator", "", ob.@CreatorId); |
880 | WriteElementString("Name", "", ob.@Name); | 880 | WriteElementString("Name", "", ob.@Name); |
881 | WriteElementString("Description", "", ob.@Description); | 881 | WriteElementString("Description", "", ob.@Description); |
882 | WriteElementString("NextPermissions", "", ob.@NextPermissions.ToString(CultureInfo.InvariantCulture)); | 882 | WriteElementString("NextPermissions", "", ob.@NextPermissions.ToString(CultureInfo.InvariantCulture)); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 891fa9e..7e99337 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1729,7 +1729,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1729 | descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); | 1729 | descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); |
1730 | descend.ItemData[i].ItemID = item.ID; | 1730 | descend.ItemData[i].ItemID = item.ID; |
1731 | descend.ItemData[i].AssetID = item.AssetID; | 1731 | descend.ItemData[i].AssetID = item.AssetID; |
1732 | descend.ItemData[i].CreatorID = item.Creator; | 1732 | descend.ItemData[i].CreatorID = item.CreatorIdAsUuid; |
1733 | descend.ItemData[i].BaseMask = item.BasePermissions; | 1733 | descend.ItemData[i].BaseMask = item.BasePermissions; |
1734 | descend.ItemData[i].Description = LLUtil.StringToPacketBytes(item.Description); | 1734 | descend.ItemData[i].Description = LLUtil.StringToPacketBytes(item.Description); |
1735 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; | 1735 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; |
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1928 | inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); | 1928 | inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); |
1929 | inventoryReply.InventoryData[0].ItemID = item.ID; | 1929 | inventoryReply.InventoryData[0].ItemID = item.ID; |
1930 | inventoryReply.InventoryData[0].AssetID = item.AssetID; | 1930 | inventoryReply.InventoryData[0].AssetID = item.AssetID; |
1931 | inventoryReply.InventoryData[0].CreatorID = item.Creator; | 1931 | inventoryReply.InventoryData[0].CreatorID = item.CreatorIdAsUuid; |
1932 | inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; | 1932 | inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; |
1933 | inventoryReply.InventoryData[0].CreationDate = item.CreationDate; | 1933 | inventoryReply.InventoryData[0].CreationDate = item.CreationDate; |
1934 | 1934 | ||
@@ -1950,13 +1950,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1950 | inventoryReply.InventoryData[0].SaleType = item.SaleType; | 1950 | inventoryReply.InventoryData[0].SaleType = item.SaleType; |
1951 | 1951 | ||
1952 | inventoryReply.InventoryData[0].CRC = | 1952 | inventoryReply.InventoryData[0].CRC = |
1953 | Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, | 1953 | Helpers.InventoryCRC( |
1954 | inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, | 1954 | 1000, 0, inventoryReply.InventoryData[0].InvType, |
1955 | inventoryReply.InventoryData[0].GroupID, 100, | 1955 | inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, |
1956 | inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID, | 1956 | inventoryReply.InventoryData[0].GroupID, 100, |
1957 | inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID, | 1957 | inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID, |
1958 | FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, | 1958 | inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID, |
1959 | FULL_MASK_PERMISSIONS); | 1959 | FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, |
1960 | FULL_MASK_PERMISSIONS); | ||
1960 | inventoryReply.Header.Zerocoded = true; | 1961 | inventoryReply.Header.Zerocoded = true; |
1961 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); | 1962 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); |
1962 | } | 1963 | } |
@@ -2075,7 +2076,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2075 | 2076 | ||
2076 | itemBlock.ItemID = item.ID; | 2077 | itemBlock.ItemID = item.ID; |
2077 | itemBlock.AssetID = item.AssetID; | 2078 | itemBlock.AssetID = item.AssetID; |
2078 | itemBlock.CreatorID = item.Creator; | 2079 | itemBlock.CreatorID = item.CreatorIdAsUuid; |
2079 | itemBlock.BaseMask = item.BasePermissions; | 2080 | itemBlock.BaseMask = item.BasePermissions; |
2080 | itemBlock.Description = LLUtil.StringToPacketBytes(item.Description); | 2081 | itemBlock.Description = LLUtil.StringToPacketBytes(item.Description); |
2081 | itemBlock.EveryoneMask = item.EveryOnePermissions; | 2082 | itemBlock.EveryoneMask = item.EveryOnePermissions; |
@@ -2138,7 +2139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2138 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); | 2139 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); |
2139 | bulkUpdate.ItemData[0].ItemID = item.ID; | 2140 | bulkUpdate.ItemData[0].ItemID = item.ID; |
2140 | bulkUpdate.ItemData[0].AssetID = item.AssetID; | 2141 | bulkUpdate.ItemData[0].AssetID = item.AssetID; |
2141 | bulkUpdate.ItemData[0].CreatorID = item.Creator; | 2142 | bulkUpdate.ItemData[0].CreatorID = item.CreatorIdAsUuid; |
2142 | bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; | 2143 | bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; |
2143 | bulkUpdate.ItemData[0].CreationDate = item.CreationDate; | 2144 | bulkUpdate.ItemData[0].CreationDate = item.CreationDate; |
2144 | bulkUpdate.ItemData[0].Description = LLUtil.StringToPacketBytes(item.Description); | 2145 | bulkUpdate.ItemData[0].Description = LLUtil.StringToPacketBytes(item.Description); |
@@ -2186,7 +2187,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2186 | InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock(); | 2187 | InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock(); |
2187 | InventoryReply.InventoryData[0].ItemID = Item.ID; | 2188 | InventoryReply.InventoryData[0].ItemID = Item.ID; |
2188 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; | 2189 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; |
2189 | InventoryReply.InventoryData[0].CreatorID = Item.Creator; | 2190 | InventoryReply.InventoryData[0].CreatorID = Item.CreatorIdAsUuid; |
2190 | InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; | 2191 | InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; |
2191 | InventoryReply.InventoryData[0].Description = LLUtil.StringToPacketBytes(Item.Description); | 2192 | InventoryReply.InventoryData[0].Description = LLUtil.StringToPacketBytes(Item.Description); |
2192 | InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; | 2193 | InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; |
@@ -6746,7 +6747,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6746 | InventoryItemBase item = new InventoryItemBase(); | 6747 | InventoryItemBase item = new InventoryItemBase(); |
6747 | item.ID = rezScriptx.InventoryBlock.ItemID; | 6748 | item.ID = rezScriptx.InventoryBlock.ItemID; |
6748 | item.Folder = rezScriptx.InventoryBlock.FolderID; | 6749 | item.Folder = rezScriptx.InventoryBlock.FolderID; |
6749 | item.Creator = rezScriptx.InventoryBlock.CreatorID; | 6750 | item.CreatorId = rezScriptx.InventoryBlock.CreatorID.ToString(); |
6750 | item.Owner = rezScriptx.InventoryBlock.OwnerID; | 6751 | item.Owner = rezScriptx.InventoryBlock.OwnerID; |
6751 | item.BasePermissions = rezScriptx.InventoryBlock.BaseMask; | 6752 | item.BasePermissions = rezScriptx.InventoryBlock.BaseMask; |
6752 | item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask; | 6753 | item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask; |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 8bdf084..a8e5ae3 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -211,7 +211,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
211 | } | 211 | } |
212 | } | 212 | } |
213 | 213 | ||
214 | |||
215 | private void DoCreateItem(uint callbackID) | 214 | private void DoCreateItem(uint callbackID) |
216 | { | 215 | { |
217 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); | 216 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); |
@@ -223,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
223 | { | 222 | { |
224 | InventoryItemBase item = new InventoryItemBase(); | 223 | InventoryItemBase item = new InventoryItemBase(); |
225 | item.Owner = ourClient.AgentId; | 224 | item.Owner = ourClient.AgentId; |
226 | item.Creator = ourClient.AgentId; | 225 | item.CreatorId = ourClient.AgentId.ToString(); |
227 | item.ID = UUID.Random(); | 226 | item.ID = UUID.Random(); |
228 | item.AssetID = m_asset.FullID; | 227 | item.AssetID = m_asset.FullID; |
229 | item.Description = m_description; | 228 | item.Description = m_description; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index edb2c56..246cf55 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -819,7 +819,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
819 | item.AssetType = (int)AssetType.CallingCard; | 819 | item.AssetType = (int)AssetType.CallingCard; |
820 | item.BasePermissions = (uint)PermissionMask.Copy; | 820 | item.BasePermissions = (uint)PermissionMask.Copy; |
821 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 821 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
822 | item.Creator = creator; | 822 | item.CreatorId = creator.ToString(); |
823 | item.CurrentPermissions = item.BasePermissions; | 823 | item.CurrentPermissions = item.BasePermissions; |
824 | item.Description = ""; | 824 | item.Description = ""; |
825 | item.EveryOnePermissions = (uint)PermissionMask.None; | 825 | item.EveryOnePermissions = (uint)PermissionMask.None; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 8dec2c4..8732e2e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
97 | item.InvType = Convert.ToInt32(reader.ReadString()); | 97 | item.InvType = Convert.ToInt32(reader.ReadString()); |
98 | reader.ReadEndElement(); | 98 | reader.ReadEndElement(); |
99 | reader.ReadStartElement("CreatorUUID"); | 99 | reader.ReadStartElement("CreatorUUID"); |
100 | item.Creator = UUID.Parse(reader.ReadString()); | 100 | item.CreatorId = reader.ReadString(); |
101 | reader.ReadEndElement(); | 101 | reader.ReadEndElement(); |
102 | reader.ReadStartElement("CreationDate"); | 102 | reader.ReadStartElement("CreationDate"); |
103 | item.CreationDate = Convert.ToInt32(reader.ReadString()); | 103 | item.CreationDate = Convert.ToInt32(reader.ReadString()); |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
329 | // Don't use the item ID that's in the file | 329 | // Don't use the item ID that's in the file |
330 | item.ID = UUID.Random(); | 330 | item.ID = UUID.Random(); |
331 | 331 | ||
332 | item.Creator = m_userInfo.UserProfile.ID; | 332 | item.CreatorId = m_userInfo.UserProfile.ID.ToString(); |
333 | item.Owner = m_userInfo.UserProfile.ID; | 333 | item.Owner = m_userInfo.UserProfile.ID; |
334 | 334 | ||
335 | // Reset folder ID to the one in which we want to load it | 335 | // Reset folder ID to the one in which we want to load it |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 90a51c3..f302696 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
140 | writer.WriteString(inventoryItem.InvType.ToString()); | 140 | writer.WriteString(inventoryItem.InvType.ToString()); |
141 | writer.WriteEndElement(); | 141 | writer.WriteEndElement(); |
142 | writer.WriteStartElement("CreatorUUID"); | 142 | writer.WriteStartElement("CreatorUUID"); |
143 | writer.WriteString(inventoryItem.Creator.ToString()); | 143 | writer.WriteString(inventoryItem.CreatorId); |
144 | writer.WriteEndElement(); | 144 | writer.WriteEndElement(); |
145 | writer.WriteStartElement("CreationDate"); | 145 | writer.WriteStartElement("CreationDate"); |
146 | writer.WriteString(inventoryItem.CreationDate.ToString()); | 146 | writer.WriteString(inventoryItem.CreationDate.ToString()); |
@@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
189 | 189 | ||
190 | m_archive.WriteFile(filename, sw.ToString()); | 190 | m_archive.WriteFile(filename, sw.ToString()); |
191 | 191 | ||
192 | UUID creatorId = inventoryItem.Creator; | 192 | UUID creatorId = inventoryItem.CreatorIdAsUuid; |
193 | 193 | ||
194 | // Record the creator of this item | 194 | // Record the creator of this item |
195 | m_userUuids[creatorId] = 1; | 195 | m_userUuids[creatorId] = 1; |
diff --git a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs index 8b2a5ca..87272a1 100644 --- a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs | |||
@@ -24,6 +24,7 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System; | 28 | using System; |
28 | using System.Collections; | 29 | using System.Collections; |
29 | using System.IO; | 30 | using System.IO; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 11cee7c..bebf234 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
478 | // Insert a copy of the item into the recipient | 478 | // Insert a copy of the item into the recipient |
479 | InventoryItemBase itemCopy = new InventoryItemBase(); | 479 | InventoryItemBase itemCopy = new InventoryItemBase(); |
480 | itemCopy.Owner = recipient; | 480 | itemCopy.Owner = recipient; |
481 | itemCopy.Creator = item.Creator; | 481 | itemCopy.CreatorId = item.CreatorId; |
482 | itemCopy.ID = UUID.Random(); | 482 | itemCopy.ID = UUID.Random(); |
483 | itemCopy.AssetID = item.AssetID; | 483 | itemCopy.AssetID = item.AssetID; |
484 | itemCopy.Description = item.Description; | 484 | itemCopy.Description = item.Description; |
@@ -836,7 +836,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
836 | { | 836 | { |
837 | InventoryItemBase item = new InventoryItemBase(); | 837 | InventoryItemBase item = new InventoryItemBase(); |
838 | item.Owner = remoteClient.AgentId; | 838 | item.Owner = remoteClient.AgentId; |
839 | item.Creator = remoteClient.AgentId; | 839 | item.CreatorId = remoteClient.AgentId.ToString(); |
840 | item.ID = UUID.Random(); | 840 | item.ID = UUID.Random(); |
841 | item.AssetID = asset.FullID; | 841 | item.AssetID = asset.FullID; |
842 | item.Description = asset.Description; | 842 | item.Description = asset.Description; |
@@ -1086,7 +1086,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1086 | InventoryItemBase agentItem = new InventoryItemBase(); | 1086 | InventoryItemBase agentItem = new InventoryItemBase(); |
1087 | 1087 | ||
1088 | agentItem.ID = UUID.Random(); | 1088 | agentItem.ID = UUID.Random(); |
1089 | agentItem.Creator = taskItem.CreatorID; | 1089 | agentItem.CreatorId = taskItem.CreatorID.ToString(); |
1090 | agentItem.Owner = destAgent; | 1090 | agentItem.Owner = destAgent; |
1091 | agentItem.AssetID = taskItem.AssetID; | 1091 | agentItem.AssetID = taskItem.AssetID; |
1092 | agentItem.Description = taskItem.Description; | 1092 | agentItem.Description = taskItem.Description; |
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1549 | taskItem.Type = itemBase.AssetType; | 1549 | taskItem.Type = itemBase.AssetType; |
1550 | taskItem.InvType = itemBase.InvType; | 1550 | taskItem.InvType = itemBase.InvType; |
1551 | taskItem.OwnerID = itemBase.Owner; | 1551 | taskItem.OwnerID = itemBase.Owner; |
1552 | taskItem.CreatorID = itemBase.Creator; | 1552 | taskItem.CreatorID = itemBase.CreatorIdAsUuid; |
1553 | taskItem.BasePermissions = itemBase.BasePermissions; | 1553 | taskItem.BasePermissions = itemBase.BasePermissions; |
1554 | taskItem.CurrentPermissions = itemBase.CurrentPermissions; | 1554 | taskItem.CurrentPermissions = itemBase.CurrentPermissions; |
1555 | taskItem.EveryonePermissions = itemBase.EveryOnePermissions; | 1555 | taskItem.EveryonePermissions = itemBase.EveryOnePermissions; |
@@ -1946,12 +1946,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1946 | } | 1946 | } |
1947 | 1947 | ||
1948 | item = new InventoryItemBase(); | 1948 | item = new InventoryItemBase(); |
1949 | item.Creator = objectGroup.RootPart.CreatorID; | 1949 | item.CreatorId = objectGroup.RootPart.CreatorID.ToString(); |
1950 | item.ID = UUID.Random(); | 1950 | item.ID = UUID.Random(); |
1951 | item.InvType = (int)InventoryType.Object; | 1951 | item.InvType = (int)InventoryType.Object; |
1952 | item.Folder = folder.ID; | 1952 | item.Folder = folder.ID; |
1953 | item.Owner = userInfo.UserProfile.ID; | 1953 | item.Owner = userInfo.UserProfile.ID; |
1954 | |||
1955 | } | 1954 | } |
1956 | 1955 | ||
1957 | AssetBase asset = CreateAsset( | 1956 | AssetBase asset = CreateAsset( |
@@ -2115,6 +2114,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2115 | 2114 | ||
2116 | CachedUserInfo userInfo = | 2115 | CachedUserInfo userInfo = |
2117 | CommsManager.UserProfileCacheService.GetUserDetails(AgentId); | 2116 | CommsManager.UserProfileCacheService.GetUserDetails(AgentId); |
2117 | |||
2118 | if (userInfo != null) | 2118 | if (userInfo != null) |
2119 | { | 2119 | { |
2120 | AssetBase asset = CreateAsset( | 2120 | AssetBase asset = CreateAsset( |
@@ -2125,7 +2125,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2125 | CommsManager.AssetCache.AddAsset(asset); | 2125 | CommsManager.AssetCache.AddAsset(asset); |
2126 | 2126 | ||
2127 | InventoryItemBase item = new InventoryItemBase(); | 2127 | InventoryItemBase item = new InventoryItemBase(); |
2128 | item.Creator = grp.RootPart.CreatorID; | 2128 | item.CreatorId = grp.RootPart.CreatorID.ToString(); |
2129 | item.Owner = remoteClient.AgentId; | 2129 | item.Owner = remoteClient.AgentId; |
2130 | item.ID = UUID.Random(); | 2130 | item.ID = UUID.Random(); |
2131 | item.AssetID = asset.FullID; | 2131 | item.AssetID = asset.FullID; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3266703..041d981 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3368,7 +3368,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3368 | CommsManager.AssetCache.AddAsset(asset); | 3368 | CommsManager.AssetCache.AddAsset(asset); |
3369 | 3369 | ||
3370 | InventoryItemBase item = new InventoryItemBase(); | 3370 | InventoryItemBase item = new InventoryItemBase(); |
3371 | item.Creator = part.CreatorID; | 3371 | item.CreatorId = part.CreatorID.ToString(); |
3372 | 3372 | ||
3373 | item.ID = UUID.Random(); | 3373 | item.ID = UUID.Random(); |
3374 | item.Owner = remoteClient.AgentId; | 3374 | item.Owner = remoteClient.AgentId; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 5c47710..4c2b50f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -151,7 +151,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
151 | taskItem.Name = item.Name; | 151 | taskItem.Name = item.Name; |
152 | taskItem.Description = item.Description; | 152 | taskItem.Description = item.Description; |
153 | taskItem.OwnerID = part.OwnerID; // Transfer ownership | 153 | taskItem.OwnerID = part.OwnerID; // Transfer ownership |
154 | taskItem.CreatorID = item.Creator; | 154 | taskItem.CreatorID = item.CreatorIdAsUuid; |
155 | taskItem.Type = item.AssetType; | 155 | taskItem.Type = item.AssetType; |
156 | taskItem.InvType = item.InvType; | 156 | taskItem.InvType = item.InvType; |
157 | 157 | ||