aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLInventoryData.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-14 18:54:38 +0000
committerMelanie Thielker2008-11-14 18:54:38 +0000
commitd66f3993de49d80d1db9f139ff08485c2d7d9664 (patch)
tree5008e680b817653dfba71263c7da836005b7c3d3 /OpenSim/Data/MySQL/MySQLInventoryData.cs
parent* Allow new script creation to be locked down to only gods if specified in Op... (diff)
downloadopensim-SC_OLD-d66f3993de49d80d1db9f139ff08485c2d7d9664.zip
opensim-SC_OLD-d66f3993de49d80d1db9f139ff08485c2d7d9664.tar.gz
opensim-SC_OLD-d66f3993de49d80d1db9f139ff08485c2d7d9664.tar.bz2
opensim-SC_OLD-d66f3993de49d80d1db9f139ff08485c2d7d9664.tar.xz
Add group permissions to agent inventory.
Contains a migration. May contain nuts. Please back up your inventory data store. This revision changes the interface version!! No older regions can connect to these new UGAIM, and the new regions can't connect to the old UGAIM. Fixes a long-standing issue of permissions loss Currently persisted on MySQL only.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 755dbab..efc781d 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -333,6 +333,7 @@ namespace OpenSim.Data.MySQL
333 item.InvType = (int) reader["invType"]; 333 item.InvType = (int) reader["invType"];
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.GroupPermissions = (uint) reader["inventoryGroupPermissions"];
336 item.SalePrice = (int) reader["salePrice"]; 337 item.SalePrice = (int) reader["salePrice"];
337 item.SaleType = Convert.ToByte(reader["saleType"]); 338 item.SaleType = Convert.ToByte(reader["saleType"]);
338 item.CreationDate = (int) reader["creationDate"]; 339 item.CreationDate = (int) reader["creationDate"];
@@ -455,12 +456,12 @@ namespace OpenSim.Data.MySQL
455 string sql = 456 string sql =
456 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName" 457 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName"
457 + ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType" 458 + ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType"
458 + ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType" 459 + ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, inventoryGroupPermissions, salePrice, saleType"
459 + ", creationDate, groupID, groupOwned, flags) VALUES "; 460 + ", creationDate, groupID, groupOwned, flags) VALUES ";
460 sql += 461 sql +=
461 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription" 462 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription"
462 + ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID" 463 + ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID"
463 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?salePrice, ?saleType, ?creationDate" 464 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
464 + ", ?groupID, ?groupOwned, ?flags)"; 465 + ", ?groupID, ?groupOwned, ?flags)";
465 466
466 try 467 try
@@ -482,6 +483,7 @@ namespace OpenSim.Data.MySQL
482 result.Parameters.AddWithValue("?creatorID", item.Creator.ToString()); 483 result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
483 result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions); 484 result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
484 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); 485 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
486 result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions);
485 result.Parameters.AddWithValue("?salePrice", item.SalePrice); 487 result.Parameters.AddWithValue("?salePrice", item.SalePrice);
486 result.Parameters.AddWithValue("?saleType", item.SaleType); 488 result.Parameters.AddWithValue("?saleType", item.SaleType);
487 result.Parameters.AddWithValue("?creationDate", item.CreationDate); 489 result.Parameters.AddWithValue("?creationDate", item.CreationDate);