diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Data/MySQL/MySQLXInventoryData.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
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(); |