From bfcc57c0712170e3431617bcb09999bfbb96b8dd Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 1 Mar 2010 00:02:14 +0000 Subject: Change friends to handle offers as it was originally designed. This may need to be changed in SQLite & MSSQL as well --- OpenSim/Data/MySQL/MySQLFriendsData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLFriendsData.cs b/OpenSim/Data/MySQL/MySQLFriendsData.cs index 7a43bb6..663fad6 100644 --- a/OpenSim/Data/MySQL/MySQLFriendsData.cs +++ b/OpenSim/Data/MySQL/MySQLFriendsData.cs @@ -59,7 +59,7 @@ namespace OpenSim.Data.MySQL { MySqlCommand cmd = new MySqlCommand(); - cmd.CommandText = String.Format("select a.*,b.Flags as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = ?PrincipalID and b.Flags is not null", m_Realm); + cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = ?PrincipalID", m_Realm); cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); return DoQuery(cmd); -- cgit v1.1