From b4180339151bf98e86e6f420ae6fe7582ecebd89 Mon Sep 17 00:00:00 2001 From: Geir Nøklebye Date: Thu, 17 Mar 2016 10:37:27 +0100 Subject: Updated the code to handle Agent Preferences. Thanks to TomDataworks for providing a final solution. Signed-off-by: Kevin Cozens (mantis #7610) --- OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs | 16 ++++------------ OpenSim/Data/PGSQL/PGSQLManager.cs | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs b/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs index 20612fe..4794c71 100644 --- a/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs +++ b/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs @@ -44,20 +44,12 @@ namespace OpenSim.Data.PGSQL public AgentPreferencesData GetPrefs(UUID agentID) { - // Until someone sends in a table that works - return null; - //AgentPreferencesData[] ret = Get("PrincipalID", agentID.ToString()); - //if (ret.Length == 0) - // return null; + AgentPreferencesData[] ret = Get("PrincipalID", agentID.ToString()); - //return ret[0]; - } - - public override bool Store(AgentPreferencesData row) - { - // Until someone sends in a table that works - return false; + if (ret.Length == 0) + return null; + return ret[0]; } } diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs index 46f835a..af5a7cd 100644 --- a/OpenSim/Data/PGSQL/PGSQLManager.cs +++ b/OpenSim/Data/PGSQL/PGSQLManager.cs @@ -251,7 +251,7 @@ namespace OpenSim.Data.PGSQL } if (PGFieldType == "double precision") { - return (Double)value; + return Convert.ToDouble(value); } return CreateParameterValue(value); } -- cgit v1.1