From a9cc76e0efba7496909d613c75b81de6a9c5d979 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 30 Apr 2008 16:08:24 +0000 Subject: * Long awaited patch from A_Biondi Mantis 923. Kept alive by Melanie. Thanks A_Biondi and Melanie! * This builds but might not work. JustinCC will examine.. it may work out of the box. --- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 32 ++++++++++++++++++++++++++++- OpenSim/Data/SQLite/SQLiteRegionData.cs | 2 +- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 5c53f32..b638528 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -101,6 +101,14 @@ namespace OpenSim.Data.SQLite item.CurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]); item.BasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]); item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); + + // new fields + item.SalePrice = Convert.ToInt32(row["salePrice"]); + item.SaleType = Convert.ToByte(row["saleType"]); + item.CreationDate = Convert.ToInt32(row["creationDate"]); + item.GroupID = new LLUUID((string)row["groupID"]); + item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); + item.Flags = Convert.ToUInt32(row["Flags"]); return item; } @@ -120,6 +128,14 @@ namespace OpenSim.Data.SQLite row["inventoryCurrentPermissions"] = item.CurrentPermissions; row["inventoryBasePermissions"] = item.BasePermissions; row["inventoryEveryOnePermissions"] = item.EveryOnePermissions; + + // new fields + row["salePrice"] = item.SalePrice; + row["saleType"] = item.SaleType; + row["creationDate"] = item.CreationDate; + row["groupID"] = item.GroupID; + row["groupOwned"] = item.GroupOwned; + row["flags"] = item.Flags; } private void addFolder(InventoryFolderBase folder, bool add) @@ -530,7 +546,21 @@ namespace OpenSim.Data.SQLite createCol(inv, "inventoryBasePermissions", typeof (Int32)); createCol(inv, "inventoryEveryOnePermissions", typeof (Int32)); - inv.PrimaryKey = new DataColumn[] {inv.Columns["UUID"]}; + // sale info + createCol(inv, "salePrice", typeof(Int32)); + createCol(inv, "saleType", typeof(Byte)); + + // creation date + createCol(inv, "creationDate", typeof(Int32)); + + // group info + createCol(inv, "groupID", typeof(String)); + createCol(inv, "groupOwned", typeof(Boolean)); + + // Flags + createCol(inv, "flags", typeof(UInt32)); + + inv.PrimaryKey = new DataColumn[] { inv.Columns["UUID"] }; return inv; } diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 4355033..d385376 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -721,7 +721,7 @@ namespace OpenSim.Data.SQLite createCol(items, "everyonePermissions", typeof (UInt32)); createCol(items, "groupPermissions", typeof (UInt32)); - items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]}; + items.PrimaryKey = new DataColumn[] { items.Columns["itemID"] }; return items; } -- cgit v1.1