diff options
author | Cinder | 2015-06-12 18:48:07 -0600 |
---|---|---|
committer | Diva Canto | 2015-06-13 07:27:42 -0700 |
commit | 0fa94f222df8ed7f308730c3692bf2a774138718 (patch) | |
tree | 560efc5542dea946a79dbbaebd39b991a67ede73 /OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | |
parent | Relicense AgentPreferences files to BSD and OpenSimulator (diff) | |
download | opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.zip opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.gz opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.bz2 opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.xz |
Refactor AgentPreferences so that database operations happen centrally. the opensim way.
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs index cd9004a..bf188ee 100644 --- a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs +++ b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | |||
@@ -52,22 +52,9 @@ namespace OpenSim.Data.MySQL | |||
52 | return ret[0]; | 52 | return ret[0]; |
53 | } | 53 | } |
54 | 54 | ||
55 | public void StorePrefs(AgentPreferencesData data) | 55 | public void Store(AgentPreferencesData data) |
56 | { | 56 | { |
57 | using (MySqlCommand cmd = new MySqlCommand()) | 57 | base.Store(data); |
58 | { | ||
59 | cmd.CommandText = String.Format("replace into `{0}` (`PrincipalID`, `AccessPrefs`, `HoverHeight`, `Language`, `LanguageIsPublic`, `PermEveryone`, `PermGroup`, `PermNextOwner`) VALUES (?Principal, ?AP, ?HH, ?Lang, ?LIP, ?PE, ?PG, ?PNO)", m_Realm); | ||
60 | cmd.Parameters.AddWithValue("?Principal", data.PrincipalID.ToString()); | ||
61 | cmd.Parameters.AddWithValue("?AP", data.AccessPrefs); | ||
62 | cmd.Parameters.AddWithValue("?HH", data.HoverHeight); | ||
63 | cmd.Parameters.AddWithValue("?Lang", data.Language); | ||
64 | cmd.Parameters.AddWithValue("?LIP", data.LanguageIsPublic); | ||
65 | cmd.Parameters.AddWithValue("?PE", data.PermEveryone); | ||
66 | cmd.Parameters.AddWithValue("?PG", data.PermGroup); | ||
67 | cmd.Parameters.AddWithValue("?PNO", data.PermNextOwner); | ||
68 | |||
69 | ExecuteNonQuery(cmd); | ||
70 | } | ||
71 | } | 58 | } |
72 | } | 59 | } |
73 | } | 60 | } |