Merge branch 'master' of /home/opensim/var/repo/opensim
commit
3dc88c55a9
|
@ -79,14 +79,7 @@ namespace OpenSim.Data.MySQL
|
|||
{
|
||||
ret.PrincipalID = principalID;
|
||||
|
||||
if (m_ColumnNames == null)
|
||||
{
|
||||
m_ColumnNames = new List<string>();
|
||||
|
||||
DataTable schemaTable = result.GetSchemaTable();
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
m_ColumnNames.Add(row["ColumnName"].ToString());
|
||||
}
|
||||
CheckColumnNames(result);
|
||||
|
||||
foreach (string s in m_ColumnNames)
|
||||
{
|
||||
|
@ -105,6 +98,20 @@ namespace OpenSim.Data.MySQL
|
|||
}
|
||||
}
|
||||
|
||||
private void CheckColumnNames(IDataReader result)
|
||||
{
|
||||
if (m_ColumnNames != null)
|
||||
return;
|
||||
|
||||
List<string> columnNames = new List<string>();
|
||||
|
||||
DataTable schemaTable = result.GetSchemaTable();
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
columnNames.Add(row["ColumnName"].ToString());
|
||||
|
||||
m_ColumnNames = columnNames;
|
||||
}
|
||||
|
||||
public bool Store(AuthenticationData data)
|
||||
{
|
||||
if (data.Data.ContainsKey("UUID"))
|
||||
|
|
|
@ -91,15 +91,17 @@ namespace OpenSim.Data.MySQL
|
|||
if (m_ColumnNames != null)
|
||||
return;
|
||||
|
||||
m_ColumnNames = new List<string>();
|
||||
List<string> columnNames = new List<string>();
|
||||
|
||||
DataTable schemaTable = reader.GetSchemaTable();
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
{
|
||||
if (row["ColumnName"] != null &&
|
||||
(!m_Fields.ContainsKey(row["ColumnName"].ToString())))
|
||||
m_ColumnNames.Add(row["ColumnName"].ToString());
|
||||
columnNames.Add(row["ColumnName"].ToString());
|
||||
}
|
||||
|
||||
m_ColumnNames = columnNames;
|
||||
}
|
||||
|
||||
public virtual T[] Get(string field, string key)
|
||||
|
|
|
@ -162,17 +162,7 @@ namespace OpenSim.Data.MySQL
|
|||
ret.sizeX = Convert.ToInt32(result["sizeX"]);
|
||||
ret.sizeY = Convert.ToInt32(result["sizeY"]);
|
||||
|
||||
if (m_ColumnNames == null)
|
||||
{
|
||||
m_ColumnNames = new List<string>();
|
||||
|
||||
DataTable schemaTable = result.GetSchemaTable();
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
{
|
||||
if (row["ColumnName"] != null)
|
||||
m_ColumnNames.Add(row["ColumnName"].ToString());
|
||||
}
|
||||
}
|
||||
CheckColumnNames(result);
|
||||
|
||||
foreach (string s in m_ColumnNames)
|
||||
{
|
||||
|
@ -187,6 +177,10 @@ namespace OpenSim.Data.MySQL
|
|||
if (s == "locY")
|
||||
continue;
|
||||
|
||||
object value = result[s];
|
||||
if (value is DBNull)
|
||||
ret.Data[s] = null;
|
||||
else
|
||||
ret.Data[s] = result[s].ToString();
|
||||
}
|
||||
|
||||
|
@ -198,6 +192,23 @@ namespace OpenSim.Data.MySQL
|
|||
return retList;
|
||||
}
|
||||
|
||||
private void CheckColumnNames(IDataReader result)
|
||||
{
|
||||
if (m_ColumnNames != null)
|
||||
return;
|
||||
|
||||
List<string> columnNames = new List<string>();
|
||||
|
||||
DataTable schemaTable = result.GetSchemaTable();
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
{
|
||||
if (row["ColumnName"] != null)
|
||||
columnNames.Add(row["ColumnName"].ToString());
|
||||
}
|
||||
|
||||
m_ColumnNames = columnNames;
|
||||
}
|
||||
|
||||
public bool Store(RegionData data)
|
||||
{
|
||||
if (data.Data.ContainsKey("uuid"))
|
||||
|
|
|
@ -1617,7 +1617,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
public Object osParseJSONNew(string JSON)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osParseJSON");
|
||||
CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
|
|
|
@ -349,7 +349,26 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
private void SetDefaultValues()
|
||||
{
|
||||
DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
|
||||
TimeZoneInfo gridTimeZone;
|
||||
|
||||
try
|
||||
{
|
||||
// First try to fetch DST from Pacific Standard Time, because this is
|
||||
// the one expected by the viewer. "US/Pacific" is the string to search
|
||||
// on linux and mac, and should work also on Windows (to confirm)
|
||||
gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[TIMEZONE]: {0} Falling back to system time. System time should be set to Pacific Standard Time to provide the expected time",
|
||||
e.Message);
|
||||
|
||||
gridTimeZone = TimeZoneInfo.Local;
|
||||
}
|
||||
|
||||
DST = gridTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
|
||||
|
||||
StipendSinceLogin = "N";
|
||||
Gendered = "Y";
|
||||
EverLoggedIn = "Y";
|
||||
|
|
Loading…
Reference in New Issue