diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Data/MySQL/MySQLXInventoryData.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLXInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLXInventoryData.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index c74033e..5019994 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Data.MySQL | |||
80 | 80 | ||
81 | return m_Items.Store(item); | 81 | return m_Items.Store(item); |
82 | } | 82 | } |
83 | 83 | ||
84 | public bool DeleteFolders(string field, string val) | 84 | public bool DeleteFolders(string field, string val) |
85 | { | 85 | { |
86 | return m_Folders.Delete(field, val); | 86 | return m_Folders.Delete(field, val); |
@@ -193,7 +193,9 @@ namespace OpenSim.Data.MySQL | |||
193 | { | 193 | { |
194 | using (MySqlCommand cmd = new MySqlCommand()) | 194 | using (MySqlCommand cmd = new MySqlCommand()) |
195 | { | 195 | { |
196 | cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); | 196 | // cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); |
197 | |||
198 | cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1"); | ||
197 | 199 | ||
198 | cmd.Parameters.AddWithValue("?uuid", principalID.ToString()); | 200 | cmd.Parameters.AddWithValue("?uuid", principalID.ToString()); |
199 | cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); | 201 | cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); |
@@ -212,15 +214,18 @@ namespace OpenSim.Data.MySQL | |||
212 | { | 214 | { |
213 | cmd.Connection = dbcon; | 215 | cmd.Connection = dbcon; |
214 | 216 | ||
215 | cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID", m_Realm); | 217 | // cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID", m_Realm); |
218 | |||
219 | cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = ?PrincipalID and assetID = ?AssetID group by assetID"); | ||
220 | |||
216 | cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); | 221 | cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); |
217 | cmd.Parameters.AddWithValue("?AssetID", assetID.ToString()); | 222 | cmd.Parameters.AddWithValue("?AssetID", assetID.ToString()); |
218 | 223 | ||
219 | using (IDataReader reader = cmd.ExecuteReader()) | 224 | using (IDataReader reader = cmd.ExecuteReader()) |
220 | { | 225 | { |
221 | 226 | ||
222 | int perms = 0; | 227 | int perms = 0; |
223 | 228 | ||
224 | if (reader.Read()) | 229 | if (reader.Read()) |
225 | { | 230 | { |
226 | perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]); | 231 | perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]); |
@@ -323,7 +328,6 @@ namespace OpenSim.Data.MySQL | |||
323 | { | 328 | { |
324 | return false; | 329 | return false; |
325 | } | 330 | } |
326 | cmd.Dispose(); | ||
327 | } | 331 | } |
328 | 332 | ||
329 | dbcon.Close(); | 333 | dbcon.Close(); |