From e1aa83e965440b3e830d599e18ff078104e8a886 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 9 Jan 2008 04:13:04 +0000 Subject: * Added a hashtable based HTTP processor in preparation of the web_login_key * Added the web_login_key to the users table * Added happy configurable http error message pages * This update is large enough to have 'awe' value.. so backup your users or weep. * Not tested on MSSQL, even though I added code to update the tables! --- OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Framework/Data.SQLite') diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index e9a8eca..cbbb349 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs @@ -549,6 +549,7 @@ namespace OpenSim.Framework.Data.SQLite createCol(users, "profileFirstText", typeof (String)); createCol(users, "profileImage", typeof (String)); createCol(users, "profileFirstImage", typeof (String)); + createCol(users, "webLoginKey", typeof(String)); // Add in contraints users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]}; return users; @@ -635,6 +636,8 @@ namespace OpenSim.Framework.Data.SQLite user.profileFirstText = (String) row["profileFirstText"]; user.profileImage = new LLUUID((String) row["profileImage"]); user.profileFirstImage = new LLUUID((String) row["profileFirstImage"]); + user.webLoginKey = new LLUUID((String) row["webLoginKey"]); + return user; } @@ -681,6 +684,7 @@ namespace OpenSim.Framework.Data.SQLite row["profileFirstText"] = user.profileFirstText; row["profileImage"] = user.profileImage; row["profileFirstImage"] = user.profileFirstImage; + row["webLoginKey"] = user.webLoginKey; // ADO.NET doesn't handle NULL very well foreach (DataColumn col in ds.Tables["users"].Columns) @@ -825,6 +829,23 @@ namespace OpenSim.Framework.Data.SQLite MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); InitDB(conn); } + conn.Open(); + try + { + cmd = new SqliteCommand("select webLoginKey from users limit 1;", conn); + cmd.ExecuteNonQuery(); + } + catch (SqliteSyntaxException) + { + cmd = new SqliteCommand("alter table users add column webLoginKey text default '00000000-0000-0000-0000-000000000000';", conn); + cmd.ExecuteNonQuery(); + pDa.Fill(tmpDS, "users"); + } + finally + { + conn.Close(); + } + return true; } } -- cgit v1.1