aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-09 04:13:04 +0000
committerTeravus Ovares2008-01-09 04:13:04 +0000
commite1aa83e965440b3e830d599e18ff078104e8a886 (patch)
treeb6f97c44228c41736a7145e8943d4b7c8d535983 /OpenSim/Framework/Data.SQLite
parentdump_assets_to_file=true will now cause the asset to go into a UserAssets sub... (diff)
downloadopensim-SC_OLD-e1aa83e965440b3e830d599e18ff078104e8a886.zip
opensim-SC_OLD-e1aa83e965440b3e830d599e18ff078104e8a886.tar.gz
opensim-SC_OLD-e1aa83e965440b3e830d599e18ff078104e8a886.tar.bz2
opensim-SC_OLD-e1aa83e965440b3e830d599e18ff078104e8a886.tar.xz
* 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!
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs21
1 files changed, 21 insertions, 0 deletions
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
549 createCol(users, "profileFirstText", typeof (String)); 549 createCol(users, "profileFirstText", typeof (String));
550 createCol(users, "profileImage", typeof (String)); 550 createCol(users, "profileImage", typeof (String));
551 createCol(users, "profileFirstImage", typeof (String)); 551 createCol(users, "profileFirstImage", typeof (String));
552 createCol(users, "webLoginKey", typeof(String));
552 // Add in contraints 553 // Add in contraints
553 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]}; 554 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]};
554 return users; 555 return users;
@@ -635,6 +636,8 @@ namespace OpenSim.Framework.Data.SQLite
635 user.profileFirstText = (String) row["profileFirstText"]; 636 user.profileFirstText = (String) row["profileFirstText"];
636 user.profileImage = new LLUUID((String) row["profileImage"]); 637 user.profileImage = new LLUUID((String) row["profileImage"]);
637 user.profileFirstImage = new LLUUID((String) row["profileFirstImage"]); 638 user.profileFirstImage = new LLUUID((String) row["profileFirstImage"]);
639 user.webLoginKey = new LLUUID((String) row["webLoginKey"]);
640
638 return user; 641 return user;
639 } 642 }
640 643
@@ -681,6 +684,7 @@ namespace OpenSim.Framework.Data.SQLite
681 row["profileFirstText"] = user.profileFirstText; 684 row["profileFirstText"] = user.profileFirstText;
682 row["profileImage"] = user.profileImage; 685 row["profileImage"] = user.profileImage;
683 row["profileFirstImage"] = user.profileFirstImage; 686 row["profileFirstImage"] = user.profileFirstImage;
687 row["webLoginKey"] = user.webLoginKey;
684 688
685 // ADO.NET doesn't handle NULL very well 689 // ADO.NET doesn't handle NULL very well
686 foreach (DataColumn col in ds.Tables["users"].Columns) 690 foreach (DataColumn col in ds.Tables["users"].Columns)
@@ -825,6 +829,23 @@ namespace OpenSim.Framework.Data.SQLite
825 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 829 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
826 InitDB(conn); 830 InitDB(conn);
827 } 831 }
832 conn.Open();
833 try
834 {
835 cmd = new SqliteCommand("select webLoginKey from users limit 1;", conn);
836 cmd.ExecuteNonQuery();
837 }
838 catch (SqliteSyntaxException)
839 {
840 cmd = new SqliteCommand("alter table users add column webLoginKey text default '00000000-0000-0000-0000-000000000000';", conn);
841 cmd.ExecuteNonQuery();
842 pDa.Fill(tmpDS, "users");
843 }
844 finally
845 {
846 conn.Close();
847 }
848
828 return true; 849 return true;
829 } 850 }
830 } 851 }