aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteEstateData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteEstateData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index db85239..93d86b6 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Data.SQLite
74 BindingFlags.DeclaredOnly); 74 BindingFlags.DeclaredOnly);
75 75
76 foreach (FieldInfo f in m_Fields) 76 foreach (FieldInfo f in m_Fields)
77 if(f.Name.Substring(0, 2) == "m_") 77 if (f.Name.Substring(0, 2) == "m_")
78 m_FieldMap[f.Name.Substring(2)] = f; 78 m_FieldMap[f.Name.Substring(2)] = f;
79 } 79 }
80 80
@@ -97,14 +97,14 @@ namespace OpenSim.Data.SQLite
97 97
98 IDataReader r = cmd.ExecuteReader(); 98 IDataReader r = cmd.ExecuteReader();
99 99
100 if(r.Read()) 100 if (r.Read())
101 { 101 {
102 foreach (string name in FieldList) 102 foreach (string name in FieldList)
103 { 103 {
104 if(m_FieldMap[name].GetValue(es) is bool) 104 if (m_FieldMap[name].GetValue(es) is bool)
105 { 105 {
106 int v = Convert.ToInt32(r[name]); 106 int v = Convert.ToInt32(r[name]);
107 if(v != 0) 107 if (v != 0)
108 m_FieldMap[name].SetValue(es, true); 108 m_FieldMap[name].SetValue(es, true);
109 else 109 else
110 m_FieldMap[name].SetValue(es, false); 110 m_FieldMap[name].SetValue(es, false);
@@ -133,9 +133,9 @@ namespace OpenSim.Data.SQLite
133 133
134 foreach (string name in FieldList) 134 foreach (string name in FieldList)
135 { 135 {
136 if(m_FieldMap[name].GetValue(es) is bool) 136 if (m_FieldMap[name].GetValue(es) is bool)
137 { 137 {
138 if((bool)m_FieldMap[name].GetValue(es)) 138 if ((bool)m_FieldMap[name].GetValue(es))
139 cmd.Parameters.Add(":"+name, "1"); 139 cmd.Parameters.Add(":"+name, "1");
140 else 140 else
141 cmd.Parameters.Add(":"+name, "0"); 141 cmd.Parameters.Add(":"+name, "0");
@@ -215,9 +215,9 @@ namespace OpenSim.Data.SQLite
215 215
216 foreach (string name in FieldList) 216 foreach (string name in FieldList)
217 { 217 {
218 if(m_FieldMap[name].GetValue(es) is bool) 218 if (m_FieldMap[name].GetValue(es) is bool)
219 { 219 {
220 if((bool)m_FieldMap[name].GetValue(es)) 220 if ((bool)m_FieldMap[name].GetValue(es))
221 cmd.Parameters.Add(":"+name, "1"); 221 cmd.Parameters.Add(":"+name, "1");
222 else 222 else
223 cmd.Parameters.Add(":"+name, "0"); 223 cmd.Parameters.Add(":"+name, "0");
@@ -247,7 +247,7 @@ namespace OpenSim.Data.SQLite
247 247
248 IDataReader r = cmd.ExecuteReader(); 248 IDataReader r = cmd.ExecuteReader();
249 249
250 while(r.Read()) 250 while (r.Read())
251 { 251 {
252 EstateBan eb = new EstateBan(); 252 EstateBan eb = new EstateBan();
253 253
@@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite
275 275
276 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )"; 276 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )";
277 277
278 foreach(EstateBan b in es.EstateBans) 278 foreach (EstateBan b in es.EstateBans)
279 { 279 {
280 cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); 280 cmd.Parameters.Add(":EstateID", es.EstateID.ToString());
281 cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString()); 281 cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString());
@@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite
298 298
299 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; 299 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
300 300
301 foreach(LLUUID uuid in data) 301 foreach (LLUUID uuid in data)
302 { 302 {
303 cmd.Parameters.Add(":EstateID", EstateID.ToString()); 303 cmd.Parameters.Add(":EstateID", EstateID.ToString());
304 cmd.Parameters.Add(":uuid", uuid.ToString()); 304 cmd.Parameters.Add(":uuid", uuid.ToString());
@@ -319,7 +319,7 @@ namespace OpenSim.Data.SQLite
319 319
320 IDataReader r = cmd.ExecuteReader(); 320 IDataReader r = cmd.ExecuteReader();
321 321
322 while(r.Read()) 322 while (r.Read())
323 { 323 {
324 // EstateBan eb = new EstateBan(); 324 // EstateBan eb = new EstateBan();
325 325