Change friends to handle offers as it was originally designed. This may

need to be changed in SQLite & MSSQL as well
This commit is contained in:
Melanie
2010-03-01 00:02:14 +00:00
parent 18727235a0
commit bfcc57c071
4 changed files with 5 additions and 21 deletions

View File

@@ -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);