aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLInventoryData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 8dbee3e..eb90192 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -412,7 +412,18 @@ namespace OpenSim.Data.MSSQL
412 @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, 412 @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID,
413 @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType, 413 @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType,
414 @creationDate, @groupID, @groupOwned, @flags)"; 414 @creationDate, @groupID, @groupOwned, @flags)";
415 415 string itemName = item.Name;
416 if (item.Name.Length > 64)
417 {
418 itemName = item.Name.Substring(0, 64);
419 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters");
420 }
421 string itemDesc = item.Description;
422 if (item.Description.Length > 128)
423 {
424 itemDesc = item.Description.Substring(0, 128);
425 m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters");
426 }
416 using (AutoClosingSqlCommand command = database.Query(sql)) 427 using (AutoClosingSqlCommand command = database.Query(sql))
417 { 428 {
418 command.Parameters.Add(database.CreateParameter("inventoryID", item.ID)); 429 command.Parameters.Add(database.CreateParameter("inventoryID", item.ID));
@@ -420,7 +431,7 @@ namespace OpenSim.Data.MSSQL
420 command.Parameters.Add(database.CreateParameter("assetType", item.AssetType)); 431 command.Parameters.Add(database.CreateParameter("assetType", item.AssetType));
421 command.Parameters.Add(database.CreateParameter("parentFolderID", item.Folder)); 432 command.Parameters.Add(database.CreateParameter("parentFolderID", item.Folder));
422 command.Parameters.Add(database.CreateParameter("avatarID", item.Owner)); 433 command.Parameters.Add(database.CreateParameter("avatarID", item.Owner));
423 command.Parameters.Add(database.CreateParameter("inventoryName", item.Name)); 434 command.Parameters.Add(database.CreateParameter("inventoryName", itemName));
424 command.Parameters.Add(database.CreateParameter("inventoryDescription", item.Description)); 435 command.Parameters.Add(database.CreateParameter("inventoryDescription", item.Description));
425 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); 436 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
426 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); 437 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));