From 41c883ea47105d04087fb173047b6cd7e17be40d Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 25 Feb 2009 11:01:38 +0000 Subject: [PATCH] * Refactored SOP.FolderID weirdness by removing calls to empty setter. YEs, I do realize the setter has to be there for legacy reasons, but since the calls will never acually DO anyhting, I'm removing them. * So, SOP.FolderID is actually a cruft field that should be removed. --- OpenSim/Data/MSSQL/MSSQLRegionData.cs | 5 +---- OpenSim/Data/MySQL/MySQLRegionData.cs | 4 ---- OpenSim/Data/SQLite/SQLiteRegionData.cs | 7 ------- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 +++- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index d9565d48bf..f284c8d9ed 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs @@ -122,10 +122,7 @@ namespace OpenSim.Data.MSSQL sceneObjectPart.Shape = PrimitiveBaseShape.Default; else sceneObjectPart.Shape = BuildShape(reader); - - // A relic from when we we thought that prims contained folder objects. In - // reality, prim == folder - sceneObjectPart.FolderID = sceneObjectPart.UUID; + sceneObjectParts.Add(sceneObjectPart); UUID groupID = new UUID((Guid)reader["SceneGroupID"]); diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 4b07ed632b..e39b185bd8 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -441,10 +441,6 @@ namespace OpenSim.Data.MySQL else prim.Shape = BuildShape(reader); - prim.FolderID = prim.UUID; // A relic from when we - // we thought prims contained - // folder objects. In - // reality, prim == folder prims.Add(prim); UUID groupID = new UUID(reader["SceneGroupID"].ToString()); diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 7ec4ceb5fa..2d0f6d8eea 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -516,13 +516,6 @@ namespace OpenSim.Data.SQLite } prim.Inventory.RestoreInventoryItems(inventory); - - // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in - // every item). This data should really be stored in the prim table itself. - if (dbItemRows.Length > 0) - { - prim.FolderID = inventory[0].ParentID; - } } /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 147019169f..5b0480f366 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -375,13 +375,15 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// A relic from when we we thought that prims contained folder objects. In + /// reality, prim == folder /// Exposing this is not particularly good, but it's one of the least evils at the moment to see /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. /// public UUID FolderID { get { return UUID; } - set { } // Don't allow assignment, or legacy prims wil b0rk + set { } // Don't allow assignment, or legacy prims wil b0rk - but we need the setter for legacy serialization. } ///