diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Data/PGSQL/PGSQLInventoryData.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLInventoryData.cs | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLInventoryData.cs index c999433..30fc5ea 100644 --- a/OpenSim/Data/PGSQL/PGSQLInventoryData.cs +++ b/OpenSim/Data/PGSQL/PGSQLInventoryData.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Data.PGSQL | |||
69 | { | 69 | { |
70 | m_connectionString = connectionString; | 70 | m_connectionString = connectionString; |
71 | database = new PGSQLManager(connectionString); | 71 | database = new PGSQLManager(connectionString); |
72 | 72 | ||
73 | //New migrations check of store | 73 | //New migrations check of store |
74 | database.CheckMigration(_migrationStore); | 74 | database.CheckMigration(_migrationStore); |
75 | } | 75 | } |
@@ -190,8 +190,8 @@ namespace OpenSim.Data.PGSQL | |||
190 | /* NOTE: the implementation below is very inefficient (makes a separate request to get subfolders for | 190 | /* NOTE: the implementation below is very inefficient (makes a separate request to get subfolders for |
191 | * every found folder, recursively). Inventory code for other DBs has been already rewritten to get ALL | 191 | * every found folder, recursively). Inventory code for other DBs has been already rewritten to get ALL |
192 | * inventory for a specific user at once. | 192 | * inventory for a specific user at once. |
193 | * | 193 | * |
194 | * Meanwhile, one little thing is corrected: getFolderHierarchy(UUID.Zero) doesn't make sense and should never | 194 | * Meanwhile, one little thing is corrected: getFolderHierarchy(UUID.Zero) doesn't make sense and should never |
195 | * be used, so check for that and return an empty list. | 195 | * be used, so check for that and return an empty list. |
196 | */ | 196 | */ |
197 | 197 | ||
@@ -264,11 +264,11 @@ namespace OpenSim.Data.PGSQL | |||
264 | /// <param name="folder">Folder to update</param> | 264 | /// <param name="folder">Folder to update</param> |
265 | public void updateInventoryFolder(InventoryFolderBase folder) | 265 | public void updateInventoryFolder(InventoryFolderBase folder) |
266 | { | 266 | { |
267 | string sql = @"UPDATE inventoryfolders SET ""agentID"" = :agentID, | 267 | string sql = @"UPDATE inventoryfolders SET ""agentID"" = :agentID, |
268 | ""parentFolderID"" = :parentFolderID, | 268 | ""parentFolderID"" = :parentFolderID, |
269 | ""folderName"" = :folderName, | 269 | ""folderName"" = :folderName, |
270 | type = :type, | 270 | type = :type, |
271 | version = :version | 271 | version = :version |
272 | WHERE folderID = :folderID"; | 272 | WHERE folderID = :folderID"; |
273 | 273 | ||
274 | string folderName = folder.Name; | 274 | string folderName = folder.Name; |
@@ -337,7 +337,7 @@ namespace OpenSim.Data.PGSQL | |||
337 | cmd.Parameters.Add(database.CreateParameter("parentID", UUID.Zero)); | 337 | cmd.Parameters.Add(database.CreateParameter("parentID", UUID.Zero)); |
338 | conn.Open(); | 338 | conn.Open(); |
339 | subFolders = getFolderHierarchy(folderID, cmd); | 339 | subFolders = getFolderHierarchy(folderID, cmd); |
340 | 340 | ||
341 | 341 | ||
342 | //Delete all sub-folders | 342 | //Delete all sub-folders |
343 | foreach (InventoryFolderBase f in subFolders) | 343 | foreach (InventoryFolderBase f in subFolders) |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.PGSQL | |||
403 | } | 403 | } |
404 | } | 404 | } |
405 | } | 405 | } |
406 | 406 | ||
407 | m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID); | 407 | m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID); |
408 | return null; | 408 | return null; |
409 | } | 409 | } |
@@ -420,24 +420,24 @@ namespace OpenSim.Data.PGSQL | |||
420 | return; | 420 | return; |
421 | } | 421 | } |
422 | 422 | ||
423 | string sql = @"INSERT INTO inventoryitems | 423 | string sql = @"INSERT INTO inventoryitems |
424 | (""inventoryID"", ""assetID"", ""assetType"", ""parentFolderID"", ""avatarID"", ""inventoryName"", | 424 | (""inventoryID"", ""assetID"", ""assetType"", ""parentFolderID"", ""avatarID"", ""inventoryName"", |
425 | ""inventoryDescription"", ""inventoryNextPermissions"", ""inventoryCurrentPermissions"", | 425 | ""inventoryDescription"", ""inventoryNextPermissions"", ""inventoryCurrentPermissions"", |
426 | ""invType"", ""creatorID"", ""inventoryBasePermissions"", ""inventoryEveryOnePermissions"", ""inventoryGroupPermissions"", | 426 | ""invType"", ""creatorID"", ""inventoryBasePermissions"", ""inventoryEveryOnePermissions"", ""inventoryGroupPermissions"", |
427 | ""salePrice"", ""SaleType"", ""creationDate"", ""groupID"", ""groupOwned"", flags) | 427 | ""salePrice"", ""SaleType"", ""creationDate"", ""groupID"", ""groupOwned"", flags) |
428 | VALUES | 428 | VALUES |
429 | (:inventoryID, :assetID, :assetType, :parentFolderID, :avatarID, :inventoryName, :inventoryDescription, | 429 | (:inventoryID, :assetID, :assetType, :parentFolderID, :avatarID, :inventoryName, :inventoryDescription, |
430 | :inventoryNextPermissions, :inventoryCurrentPermissions, :invType, :creatorID, | 430 | :inventoryNextPermissions, :inventoryCurrentPermissions, :invType, :creatorID, |
431 | :inventoryBasePermissions, :inventoryEveryOnePermissions, :inventoryGroupPermissions, :SalePrice, :SaleType, | 431 | :inventoryBasePermissions, :inventoryEveryOnePermissions, :inventoryGroupPermissions, :SalePrice, :SaleType, |
432 | :creationDate, :groupID, :groupOwned, :flags)"; | 432 | :creationDate, :groupID, :groupOwned, :flags)"; |
433 | 433 | ||
434 | string itemName = item.Name; | 434 | string itemName = item.Name; |
435 | if (item.Name.Length > 64) | 435 | if (item.Name.Length > 64) |
436 | { | 436 | { |
437 | itemName = item.Name.Substring(0, 64); | 437 | itemName = item.Name.Substring(0, 64); |
438 | m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters"); | 438 | m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters"); |
439 | } | 439 | } |
440 | 440 | ||
441 | string itemDesc = item.Description; | 441 | string itemDesc = item.Description; |
442 | if (item.Description.Length > 128) | 442 | if (item.Description.Length > 128) |
443 | { | 443 | { |
@@ -502,25 +502,25 @@ namespace OpenSim.Data.PGSQL | |||
502 | /// <param name="item">Inventory item to update</param> | 502 | /// <param name="item">Inventory item to update</param> |
503 | public void updateInventoryItem(InventoryItemBase item) | 503 | public void updateInventoryItem(InventoryItemBase item) |
504 | { | 504 | { |
505 | string sql = @"UPDATE inventoryitems SET ""assetID"" = :assetID, | 505 | string sql = @"UPDATE inventoryitems SET ""assetID"" = :assetID, |
506 | ""assetType"" = :assetType, | 506 | ""assetType"" = :assetType, |
507 | ""parentFolderID"" = :parentFolderID, | 507 | ""parentFolderID"" = :parentFolderID, |
508 | ""avatarID"" = :avatarID, | 508 | ""avatarID"" = :avatarID, |
509 | ""inventoryName"" = :inventoryName, | 509 | ""inventoryName"" = :inventoryName, |
510 | ""inventoryDescription"" = :inventoryDescription, | 510 | ""inventoryDescription"" = :inventoryDescription, |
511 | ""inventoryNextPermissions"" = :inventoryNextPermissions, | 511 | ""inventoryNextPermissions"" = :inventoryNextPermissions, |
512 | ""inventoryCurrentPermissions"" = :inventoryCurrentPermissions, | 512 | ""inventoryCurrentPermissions"" = :inventoryCurrentPermissions, |
513 | ""invType"" = :invType, | 513 | ""invType"" = :invType, |
514 | ""creatorID"" = :creatorID, | 514 | ""creatorID"" = :creatorID, |
515 | ""inventoryBasePermissions"" = :inventoryBasePermissions, | 515 | ""inventoryBasePermissions"" = :inventoryBasePermissions, |
516 | ""inventoryEveryOnePermissions"" = :inventoryEveryOnePermissions, | 516 | ""inventoryEveryOnePermissions"" = :inventoryEveryOnePermissions, |
517 | ""inventoryGroupPermissions"" = :inventoryGroupPermissions, | 517 | ""inventoryGroupPermissions"" = :inventoryGroupPermissions, |
518 | ""salePrice"" = :SalePrice, | 518 | ""salePrice"" = :SalePrice, |
519 | ""saleType"" = :SaleType, | 519 | ""saleType"" = :SaleType, |
520 | ""creationDate"" = :creationDate, | 520 | ""creationDate"" = :creationDate, |
521 | ""groupID"" = :groupID, | 521 | ""groupID"" = :groupID, |
522 | ""groupOwned"" = :groupOwned, | 522 | ""groupOwned"" = :groupOwned, |
523 | flags = :flags | 523 | flags = :flags |
524 | WHERE ""inventoryID"" = :inventoryID"; | 524 | WHERE ""inventoryID"" = :inventoryID"; |
525 | 525 | ||
526 | string itemName = item.Name; | 526 | string itemName = item.Name; |
@@ -529,7 +529,7 @@ namespace OpenSim.Data.PGSQL | |||
529 | itemName = item.Name.Substring(0, 64); | 529 | itemName = item.Name.Substring(0, 64); |
530 | m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters on update"); | 530 | m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters on update"); |
531 | } | 531 | } |
532 | 532 | ||
533 | string itemDesc = item.Description; | 533 | string itemDesc = item.Description; |
534 | if (item.Description.Length > 128) | 534 | if (item.Description.Length > 128) |
535 | { | 535 | { |