mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
This commit is contained in:
@@ -372,6 +372,11 @@ namespace OpenSim.Data.MSSQL
|
||||
return new List<int>();
|
||||
}
|
||||
|
||||
public List<int> GetEstatesByOwner(UUID ownerID)
|
||||
{
|
||||
return new List<int>();
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
|
||||
@@ -484,6 +484,36 @@ namespace OpenSim.Data.MySQL
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<int> GetEstatesByOwner(UUID ownerID)
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select estateID from estate_settings where EstateOwner = ?EstateOwner";
|
||||
cmd.Parameters.AddWithValue("?EstateOwner", ownerID);
|
||||
|
||||
using (IDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(reader["EstateID"]));
|
||||
}
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dbcon.Close();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
|
||||
@@ -412,6 +412,28 @@ namespace OpenSim.Data.SQLite
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<int> GetEstatesByOwner(UUID ownerID)
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner";
|
||||
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
cmd.CommandText = sql;
|
||||
cmd.Parameters.AddWithValue(":EstateOwner", ownerID);
|
||||
|
||||
IDataReader r = cmd.ExecuteReader();
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(r["EstateID"]));
|
||||
}
|
||||
r.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
@@ -401,7 +401,29 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public List<int> GetEstatesByOwner(UUID ownerID)
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner";
|
||||
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
cmd.CommandText = sql;
|
||||
cmd.Parameters.Add(":EstateOwner", ownerID);
|
||||
|
||||
IDataReader r = cmd.ExecuteReader();
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(r["EstateID"]));
|
||||
}
|
||||
r.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
Reference in New Issue
Block a user