mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Fixed permissions bug related to friends in PermissionsModule. Added FriendsData[] GetFriends(string principalID) to IFriendsData and FriendInfo[] GetFriends(string PrincipalID) to IFriendsService. Refactored some more in the FriendsModule. Made client get notification of local friends permissions upon HGLogin. HG Friends object permissions work.
This commit is contained in:
@@ -47,5 +47,6 @@ namespace OpenSim.Data
|
||||
bool Store(FriendsData data);
|
||||
bool Delete(UUID ownerID, string friend);
|
||||
FriendsData[] GetFriends(UUID principalID);
|
||||
FriendsData[] GetFriends(string principalID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ namespace OpenSim.Data.MSSQL
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(UUID principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(string principalID)
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
|
||||
using (SqlCommand cmd = new SqlCommand())
|
||||
@@ -79,5 +84,6 @@ namespace OpenSim.Data.MSSQL
|
||||
return DoQuery(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(UUID principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(string principalID)
|
||||
{
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@ namespace OpenSim.Data.Null
|
||||
{
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(UUID principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to implement the Get [] semantics, but it cuts corners.
|
||||
/// Specifically, it gets all friendships even if they weren't accepted yet.
|
||||
@@ -49,7 +54,7 @@ namespace OpenSim.Data.Null
|
||||
/// <param name="fields"></param>
|
||||
/// <param name="values"></param>
|
||||
/// <returns></returns>
|
||||
public FriendsData[] GetFriends(UUID userID)
|
||||
public FriendsData[] GetFriends(string userID)
|
||||
{
|
||||
List<FriendsData> lst = m_Data.FindAll(delegate (FriendsData fdata)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,12 @@ namespace OpenSim.Data.SQLite
|
||||
{
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(UUID userID)
|
||||
public FriendsData[] GetFriends(UUID principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(string userID)
|
||||
{
|
||||
SqliteCommand cmd = new SqliteCommand();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user