* 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!
This commit is contained in:
Teravus Ovares
2008-01-09 04:13:04 +00:00
parent bafdac7874
commit e1aa83e965
15 changed files with 322 additions and 132 deletions

View File

@@ -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;
}
}