aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLManager.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLManager.cs27
1 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index d2b436c..58599a8 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -590,7 +590,21 @@ namespace OpenSim.Data.MySQL
590 590
591 retval.UserFlags = Convert.ToInt32(reader["userFlags"].ToString()); 591 retval.UserFlags = Convert.ToInt32(reader["userFlags"].ToString());
592 retval.GodLevel = Convert.ToInt32(reader["godLevel"].ToString()); 592 retval.GodLevel = Convert.ToInt32(reader["godLevel"].ToString());
593 593 if (reader.IsDBNull(reader.GetOrdinal("customType")))
594 retval.CustomType = "";
595 else
596 retval.CustomType = reader["customType"].ToString();
597
598 if (reader.IsDBNull(reader.GetOrdinal("partner")))
599 {
600 retval.Partner = LLUUID.Zero;
601 }
602 else
603 {
604 LLUUID tmp;
605 LLUUID.TryParse((string)reader["partner"], out tmp);
606 retval.Partner = tmp;
607 }
594 } 608 }
595 else 609 else
596 { 610 {
@@ -731,14 +745,14 @@ namespace OpenSim.Data.MySQL
731 "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, "; 745 "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, ";
732 sql += 746 sql +=
733 "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, "; 747 "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, ";
734 sql += "`profileFirstText`, `profileImage`, `profileFirstImage`, `webLoginKey`, `userFlags`, `godLevel`) VALUES "; 748 sql += "`profileFirstText`, `profileImage`, `profileFirstImage`, `webLoginKey`, `userFlags`, `godLevel`, `customType`, `partner`) VALUES ";
735 749
736 sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passwordSalt, ?homeRegion, "; 750 sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passwordSalt, ?homeRegion, ";
737 sql += 751 sql +=
738 "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX, ?homeLookAtY, ?homeLookAtZ, ?created, "; 752 "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX, ?homeLookAtY, ?homeLookAtZ, ?created, ";
739 sql += 753 sql +=
740 "?lastLogin, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, "; 754 "?lastLogin, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, ";
741 sql += "?profileFirstText, ?profileImage, ?profileFirstImage, ?webLoginKey, ?userFlags, ?godLevel)"; 755 sql += "?profileFirstText, ?profileImage, ?profileFirstImage, ?webLoginKey, ?userFlags, ?godLevel, ?customType, ?partner)";
742 756
743 Dictionary<string, string> parameters = new Dictionary<string, string>(); 757 Dictionary<string, string> parameters = new Dictionary<string, string>();
744 parameters["?UUID"] = uuid.ToString(); 758 parameters["?UUID"] = uuid.ToString();
@@ -766,6 +780,8 @@ namespace OpenSim.Data.MySQL
766 parameters["?webLoginKey"] = string.Empty; 780 parameters["?webLoginKey"] = string.Empty;
767 parameters["?userFlags"] = "0"; 781 parameters["?userFlags"] = "0";
768 parameters["?godLevel"] = "0"; 782 parameters["?godLevel"] = "0";
783 parameters["?customType"] = "";
784 parameters["?partner"] = "";
769 785
770 786
771 bool returnval = false; 787 bool returnval = false;
@@ -821,7 +837,7 @@ namespace OpenSim.Data.MySQL
821 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 837 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
822 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 838 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
823 string aboutText, string firstText, 839 string aboutText, string firstText,
824 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey, int userFlags, int godLevel) 840 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey, int userFlags, int godLevel, string customType, LLUUID partner)
825 { 841 {
826 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; 842 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname ";
827 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; 843 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , ";
@@ -834,6 +850,7 @@ namespace OpenSim.Data.MySQL
834 sql += "`profileAboutText` = ?profileAboutText , `profileFirstText` = ?profileFirstText, "; 850 sql += "`profileAboutText` = ?profileAboutText , `profileFirstText` = ?profileFirstText, ";
835 sql += "`profileImage` = ?profileImage , `profileFirstImage` = ?profileFirstImage , "; 851 sql += "`profileImage` = ?profileImage , `profileFirstImage` = ?profileFirstImage , ";
836 sql += "`userFlags` = ?userFlags , `godLevel` = ?godLevel , "; 852 sql += "`userFlags` = ?userFlags , `godLevel` = ?godLevel , ";
853 sql += "`customType` = ?customType , `partner` = ?partner , ";
837 sql += "`webLoginKey` = ?webLoginKey WHERE UUID = ?UUID"; 854 sql += "`webLoginKey` = ?webLoginKey WHERE UUID = ?UUID";
838 855
839 Dictionary<string, string> parameters = new Dictionary<string, string>(); 856 Dictionary<string, string> parameters = new Dictionary<string, string>();
@@ -863,6 +880,8 @@ namespace OpenSim.Data.MySQL
863 parameters["?webLoginKey"] = webLoginKey.ToString(); 880 parameters["?webLoginKey"] = webLoginKey.ToString();
864 parameters["?userFlags"] = userFlags.ToString(); 881 parameters["?userFlags"] = userFlags.ToString();
865 parameters["?godLevel"] = godLevel.ToString(); 882 parameters["?godLevel"] = godLevel.ToString();
883 parameters["?customType"] = customType.ToString();
884 parameters["?partner"] = partner.ToString();
866 885
867 bool returnval = false; 886 bool returnval = false;
868 try 887 try