diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index a4b8663..4521a0f 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -342,7 +342,7 @@ namespace OpenSim.Data.MySQL | |||
342 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 342 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
343 | item.GroupPermissions = (uint) reader["inventoryGroupPermissions"]; | 343 | item.GroupPermissions = (uint) reader["inventoryGroupPermissions"]; |
344 | item.SalePrice = (int) reader["salePrice"]; | 344 | item.SalePrice = (int) reader["salePrice"]; |
345 | item.SaleType = Convert.ToByte(reader["saleType"]); | 345 | item.SaleType = unchecked((byte)(Convert.ToSByte(reader["saleType"]))); |
346 | item.CreationDate = (int) reader["creationDate"]; | 346 | item.CreationDate = (int) reader["creationDate"]; |
347 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 347 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
348 | item.Flags = (uint) reader["flags"]; | 348 | item.Flags = (uint) reader["flags"]; |
@@ -423,7 +423,7 @@ namespace OpenSim.Data.MySQL | |||
423 | /// <summary> | 423 | /// <summary> |
424 | /// Returns a specified inventory folder | 424 | /// Returns a specified inventory folder |
425 | /// </summary> | 425 | /// </summary> |
426 | /// <param name="folder">The folder to return</param> | 426 | /// <param name="folderID">The folder to return</param> |
427 | /// <returns>A folder class</returns> | 427 | /// <returns>A folder class</returns> |
428 | public InventoryFolderBase getInventoryFolder(UUID folderID) | 428 | public InventoryFolderBase getInventoryFolder(UUID folderID) |
429 | { | 429 | { |
@@ -438,8 +438,9 @@ namespace OpenSim.Data.MySQL | |||
438 | result.Parameters.AddWithValue("?uuid", folderID.ToString()); | 438 | result.Parameters.AddWithValue("?uuid", folderID.ToString()); |
439 | MySqlDataReader reader = result.ExecuteReader(); | 439 | MySqlDataReader reader = result.ExecuteReader(); |
440 | 440 | ||
441 | reader.Read(); | 441 | InventoryFolderBase folder = null; |
442 | InventoryFolderBase folder = readInventoryFolder(reader); | 442 | if (reader.Read()) |
443 | folder = readInventoryFolder(reader); | ||
443 | reader.Close(); | 444 | reader.Close(); |
444 | result.Dispose(); | 445 | result.Dispose(); |
445 | 446 | ||
@@ -506,7 +507,7 @@ namespace OpenSim.Data.MySQL | |||
506 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); | 507 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); |
507 | result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions); | 508 | result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions); |
508 | result.Parameters.AddWithValue("?salePrice", item.SalePrice); | 509 | result.Parameters.AddWithValue("?salePrice", item.SalePrice); |
509 | result.Parameters.AddWithValue("?saleType", item.SaleType); | 510 | result.Parameters.AddWithValue("?saleType", unchecked((sbyte)item.SaleType)); |
510 | result.Parameters.AddWithValue("?creationDate", item.CreationDate); | 511 | result.Parameters.AddWithValue("?creationDate", item.CreationDate); |
511 | result.Parameters.AddWithValue("?groupID", item.GroupID); | 512 | result.Parameters.AddWithValue("?groupID", item.GroupID); |
512 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); | 513 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); |
@@ -603,7 +604,7 @@ namespace OpenSim.Data.MySQL | |||
603 | cmd.Parameters.AddWithValue("?agentID", folder.Owner.ToString()); | 604 | cmd.Parameters.AddWithValue("?agentID", folder.Owner.ToString()); |
604 | cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); | 605 | cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); |
605 | cmd.Parameters.AddWithValue("?folderName", folderName); | 606 | cmd.Parameters.AddWithValue("?folderName", folderName); |
606 | cmd.Parameters.AddWithValue("?type", (short) folder.Type); | 607 | cmd.Parameters.AddWithValue("?type", folder.Type); |
607 | cmd.Parameters.AddWithValue("?version", folder.Version); | 608 | cmd.Parameters.AddWithValue("?version", folder.Version); |
608 | 609 | ||
609 | try | 610 | try |