diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 90664ff..92b005d 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class MySQLInventoryData : IInventoryData | 41 | public class MySQLInventoryData : IInventoryData |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
@@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL | |||
249 | 249 | ||
250 | // There should only ever be one root folder for a user. However, if there's more | 250 | // There should only ever be one root folder for a user. However, if there's more |
251 | // than one we'll simply use the first one rather than failing. It would be even | 251 | // than one we'll simply use the first one rather than failing. It would be even |
252 | // nicer to print some message to this effect, but this feels like it's too low a | 252 | // nicer to print some message to this effect, but this feels like it's too low a |
253 | // to put such a message out, and it's too minor right now to spare the time to | 253 | // to put such a message out, and it's too minor right now to spare the time to |
254 | // suitably refactor. | 254 | // suitably refactor. |
255 | if (items.Count > 0) | 255 | if (items.Count > 0) |
@@ -332,13 +332,13 @@ namespace OpenSim.Data.MySQL | |||
332 | item.InvType = (int) reader["invType"]; | 332 | item.InvType = (int) reader["invType"]; |
333 | item.Creator = new LLUUID((string) reader["creatorID"]); | 333 | item.Creator = new LLUUID((string) reader["creatorID"]); |
334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; | 334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; |
335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
336 | item.SalePrice = (int) reader["salePrice"]; | 336 | item.SalePrice = (int) reader["salePrice"]; |
337 | item.SaleType = Convert.ToByte(reader["saleType"]); | 337 | item.SaleType = Convert.ToByte(reader["saleType"]); |
338 | item.CreationDate = (int) reader["creationDate"]; | 338 | item.CreationDate = (int) reader["creationDate"]; |
339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
341 | item.Flags = (uint) reader["flags"]; | 341 | item.Flags = (uint) reader["flags"]; |
342 | 342 | ||
343 | return item; | 343 | return item; |
344 | } | 344 | } |
@@ -483,12 +483,12 @@ namespace OpenSim.Data.MySQL | |||
483 | result.Parameters.AddWithValue("?groupID", item.GroupID); | 483 | result.Parameters.AddWithValue("?groupID", item.GroupID); |
484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); | 484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); |
485 | result.Parameters.AddWithValue("?flags", item.Flags); | 485 | result.Parameters.AddWithValue("?flags", item.Flags); |
486 | 486 | ||
487 | lock (database) | 487 | lock (database) |
488 | { | 488 | { |
489 | result.ExecuteNonQuery(); | 489 | result.ExecuteNonQuery(); |
490 | } | 490 | } |
491 | 491 | ||
492 | result.Dispose(); | 492 | result.Dispose(); |
493 | } | 493 | } |
494 | catch (MySqlException e) | 494 | catch (MySqlException e) |
@@ -507,7 +507,7 @@ namespace OpenSim.Data.MySQL | |||
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// | 510 | /// |
511 | /// </summary> | 511 | /// </summary> |
512 | /// <param name="item"></param> | 512 | /// <param name="item"></param> |
513 | public void deleteInventoryItem(LLUUID itemID) | 513 | public void deleteInventoryItem(LLUUID itemID) |
@@ -517,7 +517,7 @@ namespace OpenSim.Data.MySQL | |||
517 | MySqlCommand cmd = | 517 | MySqlCommand cmd = |
518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); | 518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); |
519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); | 519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); |
520 | 520 | ||
521 | lock (database) | 521 | lock (database) |
522 | { | 522 | { |
523 | cmd.ExecuteNonQuery(); | 523 | cmd.ExecuteNonQuery(); |
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL | |||
596 | } | 596 | } |
597 | 597 | ||
598 | /// <summary> | 598 | /// <summary> |
599 | /// Append a list of all the child folders of a parent folder | 599 | /// Append a list of all the child folders of a parent folder |
600 | /// </summary> | 600 | /// </summary> |
601 | /// <param name="folders">list where folders will be appended</param> | 601 | /// <param name="folders">list where folders will be appended</param> |
602 | /// <param name="parentID">ID of parent</param> | 602 | /// <param name="parentID">ID of parent</param> |
@@ -623,11 +623,11 @@ namespace OpenSim.Data.MySQL | |||
623 | protected void deleteOneFolder(LLUUID folderID) | 623 | protected void deleteOneFolder(LLUUID folderID) |
624 | { | 624 | { |
625 | try | 625 | try |
626 | { | 626 | { |
627 | MySqlCommand cmd = | 627 | MySqlCommand cmd = |
628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); | 628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); |
629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
630 | 630 | ||
631 | lock (database) | 631 | lock (database) |
632 | { | 632 | { |
633 | cmd.ExecuteNonQuery(); | 633 | cmd.ExecuteNonQuery(); |
@@ -647,7 +647,7 @@ namespace OpenSim.Data.MySQL | |||
647 | MySqlCommand cmd = | 647 | MySqlCommand cmd = |
648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); | 648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); |
649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
650 | 650 | ||
651 | lock (database) | 651 | lock (database) |
652 | { | 652 | { |
653 | cmd.ExecuteNonQuery(); | 653 | cmd.ExecuteNonQuery(); |