From 958a8f274b8a25703935ab4092f190e9d54b8559 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 7 Dec 2013 01:29:15 +0000 Subject: Revert "Add support for user preferences (im via email)" This reverts commit 1842388bb4dcf5ecd57732ffa877b6ca1a3dec7b. --- OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 83 --------------------------- 1 file changed, 83 deletions(-) (limited to 'OpenSim/Data/SQLite/SQLiteUserProfilesData.cs') diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 916a226..8c1bcd4 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs @@ -747,89 +747,6 @@ namespace OpenSim.Data.SQLite } return true; } - - public bool UpdateUserPreferences(ref UserPreferences pref, ref string result) - { - string query = string.Empty; - - query += "UPDATE usersettings SET "; - query += "imviaemail=:ImViaEmail, "; - query += "visible=:Visible "; - query += "WHERE useruuid=:uuid"; - - try - { - using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) - { - cmd.CommandText = query; - cmd.Parameters.AddWithValue(":ImViaEmail", pref.IMViaEmail); - cmd.Parameters.AddWithValue(":Visible", pref.Visible); - cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); - - cmd.ExecuteNonQuery(); - } - } - catch (Exception e) - { - m_log.DebugFormat("[PROFILES_DATA]" + - ": AgentInterestsUpdate exception {0}", e.Message); - result = e.Message; - return false; - } - return true; - } - - public bool GetUserPreferences(ref UserPreferences pref, ref string result) - { - IDataReader reader = null; - string query = string.Empty; - - query += "SELECT imviaemail,visible,email FROM "; - query += "usersettings WHERE "; - query += "useruuid = :Id"; - - OSDArray data = new OSDArray(); - - try - { - using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) - { - cmd.CommandText = query; - cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString()); - - using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) - { - if(reader.Read()) - { - bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); - bool.TryParse((string)reader["visible"], out pref.Visible); - pref.EMail = (string)reader["email"]; - } - else - { - query = "INSERT INTO usersettings VALUES "; - query += "(:Id,'false','false', '')"; - - using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) - { - put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); - put.ExecuteNonQuery(); - - } - } - } - } - } - catch (Exception e) - { - m_log.DebugFormat("[PROFILES_DATA]" + - ": Get preferences exception {0}", e.Message); - result = e.Message; - return false; - } - return true; - } - public bool GetUserAppData(ref UserAppData props, ref string result) { IDataReader reader = null; -- cgit v1.1 From 1eecb34e62987f43181bea912464b76eb4c6aa45 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Jan 2014 21:16:30 +0000 Subject: Remove the core module extra profile settings support carried in with the latest patches. We don't need it. --- OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Data/SQLite/SQLiteUserProfilesData.cs') diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 90d45e9..84e56b1 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs @@ -748,6 +748,7 @@ namespace OpenSim.Data.SQLite return true; } + /* public bool UpdateUserPreferences(ref UserPreferences pref, ref string result) { string query = string.Empty; @@ -830,6 +831,7 @@ namespace OpenSim.Data.SQLite } return true; } + */ public bool GetUserAppData(ref UserAppData props, ref string result) { -- cgit v1.1