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/Data/MySQL/MySQLInventoryData.cs | |
parent | * Fix the remainder of the packets that require sessionId checks. (diff) | |
download | opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.zip opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.gz opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.bz2 opensim-SC-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.xz |
* Make it possible to store creator strings in user inventory items as well as UUIDs
* All existing functionality should be unaffected.
* Database schemas have not been changed.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 12 |
1 files changed, 5 insertions, 7 deletions
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); |