diff options
author | Justin Clarke Casey | 2009-01-07 18:46:27 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-07 18:46:27 +0000 |
commit | 8d035b196df31ddb41e4917a757e83acdbb03d78 (patch) | |
tree | 777605603b47b20075b13fd56317667b29b36185 /OpenSim/Data/MySQL/MySQLUserData.cs | |
parent | * refactor: Remove MakeHttpRequest wrapper method from Scene in favour of a d... (diff) | |
download | opensim-SC_OLD-8d035b196df31ddb41e4917a757e83acdbb03d78.zip opensim-SC_OLD-8d035b196df31ddb41e4917a757e83acdbb03d78.tar.gz opensim-SC_OLD-8d035b196df31ddb41e4917a757e83acdbb03d78.tar.bz2 opensim-SC_OLD-8d035b196df31ddb41e4917a757e83acdbb03d78.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2948
* This fixes adding and updating user profiles in MySQL on platforms that have a commas as a decimal separator
* Thanks Tommil!
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLUserData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 14d178b..f6a9af3 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -176,7 +176,7 @@ namespace OpenSim.Data.MySQL | |||
176 | 176 | ||
177 | try | 177 | try |
178 | { | 178 | { |
179 | Dictionary<string, string> param = new Dictionary<string, string>(); | 179 | Dictionary<string, object> param = new Dictionary<string, object>(); |
180 | param["?first"] = user; | 180 | param["?first"] = user; |
181 | param["?second"] = last; | 181 | param["?second"] = last; |
182 | 182 | ||
@@ -209,7 +209,7 @@ namespace OpenSim.Data.MySQL | |||
209 | { | 209 | { |
210 | int dtvalue = Util.UnixTimeSinceEpoch(); | 210 | int dtvalue = Util.UnixTimeSinceEpoch(); |
211 | 211 | ||
212 | Dictionary<string, string> param = new Dictionary<string, string>(); | 212 | Dictionary<string, object> param = new Dictionary<string, object>(); |
213 | param["?ownerID"] = friendlistowner.ToString(); | 213 | param["?ownerID"] = friendlistowner.ToString(); |
214 | param["?friendID"] = friend.ToString(); | 214 | param["?friendID"] = friend.ToString(); |
215 | param["?friendPerms"] = perms.ToString(); | 215 | param["?friendPerms"] = perms.ToString(); |
@@ -251,7 +251,7 @@ namespace OpenSim.Data.MySQL | |||
251 | 251 | ||
252 | public override void RemoveUserFriend(UUID friendlistowner, UUID friend) | 252 | public override void RemoveUserFriend(UUID friendlistowner, UUID friend) |
253 | { | 253 | { |
254 | Dictionary<string, string> param = new Dictionary<string, string>(); | 254 | Dictionary<string, object> param = new Dictionary<string, object>(); |
255 | param["?ownerID"] = friendlistowner.ToString(); | 255 | param["?ownerID"] = friendlistowner.ToString(); |
256 | param["?friendID"] = friend.ToString(); | 256 | param["?friendID"] = friend.ToString(); |
257 | 257 | ||
@@ -285,7 +285,7 @@ namespace OpenSim.Data.MySQL | |||
285 | 285 | ||
286 | public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) | 286 | public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) |
287 | { | 287 | { |
288 | Dictionary<string, string> param = new Dictionary<string, string>(); | 288 | Dictionary<string, object> param = new Dictionary<string, object>(); |
289 | param["?ownerID"] = friendlistowner.ToString(); | 289 | param["?ownerID"] = friendlistowner.ToString(); |
290 | param["?friendID"] = friend.ToString(); | 290 | param["?friendID"] = friend.ToString(); |
291 | param["?friendPerms"] = perms.ToString(); | 291 | param["?friendPerms"] = perms.ToString(); |
@@ -318,7 +318,7 @@ namespace OpenSim.Data.MySQL | |||
318 | { | 318 | { |
319 | List<FriendListItem> Lfli = new List<FriendListItem>(); | 319 | List<FriendListItem> Lfli = new List<FriendListItem>(); |
320 | 320 | ||
321 | Dictionary<string, string> param = new Dictionary<string, string>(); | 321 | Dictionary<string, object> param = new Dictionary<string, object>(); |
322 | param["?ownerID"] = friendlistowner.ToString(); | 322 | param["?ownerID"] = friendlistowner.ToString(); |
323 | 323 | ||
324 | MySQLSuperManager dbm = GetLockedConnection("GetUserFriendList"); | 324 | MySQLSuperManager dbm = GetLockedConnection("GetUserFriendList"); |
@@ -373,7 +373,7 @@ namespace OpenSim.Data.MySQL | |||
373 | { | 373 | { |
374 | foreach (UUID uuid in uuids) | 374 | foreach (UUID uuid in uuids) |
375 | { | 375 | { |
376 | Dictionary<string, string> param = new Dictionary<string, string>(); | 376 | Dictionary<string, object> param = new Dictionary<string, object>(); |
377 | param["?uuid"] = uuid.ToString(); | 377 | param["?uuid"] = uuid.ToString(); |
378 | IDbCommand result = | 378 | IDbCommand result = |
379 | dbm.Manager.Query("select agentOnline,currentHandle from " + m_agentsTableName + | 379 | dbm.Manager.Query("select agentOnline,currentHandle from " + m_agentsTableName + |
@@ -419,7 +419,7 @@ namespace OpenSim.Data.MySQL | |||
419 | querysplit = query.Split(' '); | 419 | querysplit = query.Split(' '); |
420 | if (querysplit.Length > 1 && querysplit[1].Trim() != String.Empty) | 420 | if (querysplit.Length > 1 && querysplit[1].Trim() != String.Empty) |
421 | { | 421 | { |
422 | Dictionary<string, string> param = new Dictionary<string, string>(); | 422 | Dictionary<string, object> param = new Dictionary<string, object>(); |
423 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%"; | 423 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%"; |
424 | param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], String.Empty) + "%"; | 424 | param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], String.Empty) + "%"; |
425 | MySQLSuperManager dbm = GetLockedConnection("GeneratePickerResults"); | 425 | MySQLSuperManager dbm = GetLockedConnection("GeneratePickerResults"); |
@@ -461,7 +461,7 @@ namespace OpenSim.Data.MySQL | |||
461 | 461 | ||
462 | try | 462 | try |
463 | { | 463 | { |
464 | Dictionary<string, string> param = new Dictionary<string, string>(); | 464 | Dictionary<string, object> param = new Dictionary<string, object>(); |
465 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%"; | 465 | param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%"; |
466 | 466 | ||
467 | IDbCommand result = | 467 | IDbCommand result = |
@@ -506,7 +506,7 @@ namespace OpenSim.Data.MySQL | |||
506 | MySQLSuperManager dbm = GetLockedConnection("GetUserByUUID"); | 506 | MySQLSuperManager dbm = GetLockedConnection("GetUserByUUID"); |
507 | try | 507 | try |
508 | { | 508 | { |
509 | Dictionary<string, string> param = new Dictionary<string, string>(); | 509 | Dictionary<string, object> param = new Dictionary<string, object>(); |
510 | param["?uuid"] = uuid.ToString(); | 510 | param["?uuid"] = uuid.ToString(); |
511 | 511 | ||
512 | IDbCommand result = dbm.Manager.Query("SELECT * FROM " + m_usersTableName + " WHERE UUID = ?uuid", param); | 512 | IDbCommand result = dbm.Manager.Query("SELECT * FROM " + m_usersTableName + " WHERE UUID = ?uuid", param); |
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL | |||
596 | 596 | ||
597 | try | 597 | try |
598 | { | 598 | { |
599 | Dictionary<string, string> param = new Dictionary<string, string>(); | 599 | Dictionary<string, object> param = new Dictionary<string, object>(); |
600 | param["?uuid"] = uuid.ToString(); | 600 | param["?uuid"] = uuid.ToString(); |
601 | 601 | ||
602 | IDbCommand result = dbm.Manager.Query("SELECT * FROM " + m_agentsTableName + " WHERE UUID = ?uuid", | 602 | IDbCommand result = dbm.Manager.Query("SELECT * FROM " + m_agentsTableName + " WHERE UUID = ?uuid", |
@@ -744,7 +744,7 @@ namespace OpenSim.Data.MySQL | |||
744 | MySQLSuperManager dbm = GetLockedConnection("GetUserAppearance"); | 744 | MySQLSuperManager dbm = GetLockedConnection("GetUserAppearance"); |
745 | try | 745 | try |
746 | { | 746 | { |
747 | Dictionary<string, string> param = new Dictionary<string, string>(); | 747 | Dictionary<string, object> param = new Dictionary<string, object>(); |
748 | param["?owner"] = user.ToString(); | 748 | param["?owner"] = user.ToString(); |
749 | 749 | ||
750 | IDbCommand result = dbm.Manager.Query( | 750 | IDbCommand result = dbm.Manager.Query( |
@@ -825,7 +825,7 @@ namespace OpenSim.Data.MySQL | |||
825 | 825 | ||
826 | public Hashtable GetUserAttachments(UUID agentID) | 826 | public Hashtable GetUserAttachments(UUID agentID) |
827 | { | 827 | { |
828 | Dictionary<string, string> param = new Dictionary<string, string>(); | 828 | Dictionary<string, object> param = new Dictionary<string, object>(); |
829 | param["?uuid"] = agentID.ToString(); | 829 | param["?uuid"] = agentID.ToString(); |
830 | 830 | ||
831 | MySQLSuperManager dbm = GetLockedConnection("GetUserAttachments"); | 831 | MySQLSuperManager dbm = GetLockedConnection("GetUserAttachments"); |