aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLInventoryData.cs
diff options
context:
space:
mode:
authorKunnis2009-08-09 02:01:21 -0500
committerTeravus Ovares (Dan Olivares)2009-08-16 13:35:44 -0400
commit23d478f2fa06d1dedabfb24cf6ff763b586173ce (patch)
tree072fdcfe343d84cf01b0881045fc96fb8403c324 /OpenSim/Data/MySQL/MySQLInventoryData.cs
parentAdd copyright header. Formatting cleanup. (diff)
downloadopensim-SC-23d478f2fa06d1dedabfb24cf6ff763b586173ce.zip
opensim-SC-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.gz
opensim-SC-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.bz2
opensim-SC-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.xz
Adding in Reflection-based testing, to ensure that all properties are covered.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index a4b8663..121ef7a 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);