aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL
diff options
context:
space:
mode:
authorMW2007-07-22 11:44:36 +0000
committerMW2007-07-22 11:44:36 +0000
commit70fa30204272e874b8e3acccdc2e22cd4e42b2b2 (patch)
tree2f6c3c0f3b3bd60d5972f8dea6b3abeae4dc9065 /OpenSim/Framework/Data.MySQL
parent* Aerobic erosion now uses Navier Stokes algorithms for wind calculations. (diff)
downloadopensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.zip
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.gz
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.bz2
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.xz
* Some work in progress code: Inventory cache, start of inventory server/service, userprofile cache, inventory handling. (non of it is enabled yet (or at least it shouldn't be).
* Fixed some of the problems with crossing regions when flying: you should no longer sink to ground level when crossing (should keep roughly your right height). Should no longer sometimes get sent back to the centre of the current region when attempting to border cross. But instead sometimes you will find you avatar stop at the edge of region and you will need to start moving again to retry the crossing (which should then work). This code is partly based on Babblefrog's issue #212 patch. [I think I have some ideas of how to solve the stopping at edges problem, just want to get the inventory code done first] * Capabilities code has now been moved to the OpenSim.Framework.Communications project as some of the caps code will be tightly tied to inventory/asset handling and it was causing a two way reference problem when it was in its own project/dll. This is a Big commit as I was going to keep my inventory work local until I had it in a working state, in case it brakes anything, but its getting harder to keep in sync with svn.
Diffstat (limited to 'OpenSim/Framework/Data.MySQL')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
index d32db1b..d8bfc4d 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
@@ -152,6 +152,40 @@ namespace OpenSim.Framework.Data.MySQL
152 } 152 }
153 153
154 /// <summary> 154 /// <summary>
155 /// Returns the users inventory root folder.
156 /// </summary>
157 /// <param name="user"></param>
158 /// <returns></returns>
159 public InventoryFolderBase getUserRootFolder(LLUUID user)
160 {
161 try
162 {
163 lock (database)
164 {
165 Dictionary<string, string> param = new Dictionary<string, string>();
166 param["?uuid"] = user.ToStringHyphenated();
167 param["?zero"] = LLUUID.Zero.ToStringHyphenated();
168
169 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param);
170 IDataReader reader = result.ExecuteReader();
171
172 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
173 InventoryFolderBase rootFolder = items[0]; //should only be one folder with parent set to zero (the root one).
174 reader.Close();
175 result.Dispose();
176
177 return rootFolder;
178 }
179 }
180 catch (Exception e)
181 {
182 database.Reconnect();
183 Console.WriteLine(e.ToString());
184 return null;
185 }
186 }
187
188 /// <summary>
155 /// Returns a list of folders in a users inventory contained within the specified folder 189 /// Returns a list of folders in a users inventory contained within the specified folder
156 /// </summary> 190 /// </summary>
157 /// <param name="parentID">The folder to search</param> 191 /// <param name="parentID">The folder to search</param>